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