Skip to content

Commit

Permalink
remove kind assertions
Browse files Browse the repository at this point in the history
The shallow clone call just above always results in the kind being
shared so we don't need to assert it here.
  • Loading branch information
braddunbar committed Jan 21, 2024
1 parent e5c36ce commit a472ba6
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,7 +318,6 @@ impl BytesMut {
unsafe {
let mut other = self.shallow_clone();
other.set_start(at);
debug_assert_eq!(self.kind(), KIND_ARC);
assert!(at <= self.cap, "set_end out of bounds");

self.cap = at;
Expand Down Expand Up @@ -395,7 +394,6 @@ impl BytesMut {

unsafe {
let mut other = self.shallow_clone();
debug_assert_eq!(other.kind(), KIND_ARC);
assert!(at <= other.cap, "set_end out of bounds");

other.cap = at;
Expand Down

0 comments on commit a472ba6

Please sign in to comment.