Skip to content

Commit

Permalink
remove duplicate assertion
Browse files Browse the repository at this point in the history
we already assert this at the top of the method
  • Loading branch information
braddunbar committed Jan 21, 2024
1 parent a472ba6 commit 851b59b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/bytes_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 851b59b

Please sign in to comment.