mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-25 00:00:22 +02:00
Remove unreachable else branch (#661)
This commit is contained in:
+1
-3
@@ -1628,7 +1628,7 @@ impl From<BytesMut> for Vec<u8> {
|
|||||||
let (off, _) = bytes.get_vec_pos();
|
let (off, _) = bytes.get_vec_pos();
|
||||||
rebuild_vec(bytes.ptr.as_ptr(), bytes.len, bytes.cap, off)
|
rebuild_vec(bytes.ptr.as_ptr(), bytes.len, bytes.cap, off)
|
||||||
}
|
}
|
||||||
} else if kind == KIND_ARC {
|
} else {
|
||||||
let shared = bytes.data as *mut Shared;
|
let shared = bytes.data as *mut Shared;
|
||||||
|
|
||||||
if unsafe { (*shared).is_unique() } {
|
if unsafe { (*shared).is_unique() } {
|
||||||
@@ -1640,8 +1640,6 @@ impl From<BytesMut> for Vec<u8> {
|
|||||||
} else {
|
} else {
|
||||||
return bytes.deref().to_vec();
|
return bytes.deref().to_vec();
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
return bytes.deref().to_vec();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let len = bytes.len;
|
let len = bytes.len;
|
||||||
|
|||||||
Reference in New Issue
Block a user