Skip to content

Commit e24587d

Browse files
authored
Remove unreachable else branch (#661)
1 parent 9257a6e commit e24587d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/bytes_mut.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,7 +1628,7 @@ impl From<BytesMut> for Vec<u8> {
16281628
let (off, _) = bytes.get_vec_pos();
16291629
rebuild_vec(bytes.ptr.as_ptr(), bytes.len, bytes.cap, off)
16301630
}
1631-
} else if kind == KIND_ARC {
1631+
} else {
16321632
let shared = bytes.data as *mut Shared;
16331633

16341634
if unsafe { (*shared).is_unique() } {
@@ -1640,8 +1640,6 @@ impl From<BytesMut> for Vec<u8> {
16401640
} else {
16411641
return bytes.deref().to_vec();
16421642
}
1643-
} else {
1644-
return bytes.deref().to_vec();
16451643
};
16461644

16471645
let len = bytes.len;

0 commit comments

Comments
 (0)