Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unreachable else #661

Merged
merged 1 commit into from
Jan 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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