Skip to content

Commit

Permalink
Remove unreachable else branch (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
braddunbar authored Jan 28, 2024
1 parent 9257a6e commit e24587d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/bytes_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,7 @@ impl From<BytesMut> for Vec<u8> {
let (off, _) = bytes.get_vec_pos();
rebuild_vec(bytes.ptr.as_ptr(), bytes.len, bytes.cap, off)
}
} else if kind == KIND_ARC {
} else {
let shared = bytes.data as *mut Shared;

if unsafe { (*shared).is_unique() } {
Expand All @@ -1640,8 +1640,6 @@ impl From<BytesMut> for Vec<u8> {
} else {
return bytes.deref().to_vec();
}
} else {
return bytes.deref().to_vec();
};

let len = bytes.len;
Expand Down

0 comments on commit e24587d

Please sign in to comment.