wip: remove useless len comparison to zero, already test of empty

clippy message: length comparison to zero
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#len_zero
This commit is contained in:
Gwen Lg 2025-12-14 17:47:57 +01:00
parent 1195e1db52
commit 8a9957403a

View file

@ -161,7 +161,6 @@ mod test {
#[test]
fn test_bytes_buf() {
let mut buf = BytesBuf::new();
assert!(buf.len() == 0);
assert!(buf.is_empty());
buf.extend(Bytes::from(b"Hello, world!".to_vec()));
@ -176,7 +175,6 @@ mod test {
buf.take_all(),
Bytes::from(b"Hello, world!1234567890".to_vec())
);
assert!(buf.len() == 0);
assert!(buf.is_empty());
buf.extend(Bytes::from(b"1234567890".to_vec()));
@ -193,7 +191,6 @@ mod test {
buf.take_exact(11),
Some(Bytes::from(b"llo, world!".to_vec()))
);
assert!(buf.len() == 0);
assert!(buf.is_empty());
}
}