From 851b59be852b30bfa8da6b309846c37f78c41b42 Mon Sep 17 00:00:00 2001 From: Brad Dunbar Date: Sun, 21 Jan 2024 12:13:35 -0500 Subject: [PATCH] remove duplicate assertion we already assert this at the top of the method --- src/bytes_mut.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/bytes_mut.rs b/src/bytes_mut.rs index df1e0bd41..d167838cb 100644 --- a/src/bytes_mut.rs +++ b/src/bytes_mut.rs @@ -318,8 +318,6 @@ impl BytesMut { unsafe { let mut other = self.shallow_clone(); other.set_start(at); - assert!(at <= self.cap, "set_end out of bounds"); - self.cap = at; self.len = cmp::min(self.len, at); other