Debian Codegraph @

third_party/rust/serde_bytes/tests/test_partialeq.rs

raw
1 #![allow(clippy::needless_pass_by_value)]
2
3 use serde_bytes::{ByteBuf, Bytes};
4
5 fn _bytes_eq_slice(bytes: &Bytes, slice: &[u8]) -> bool {
6 bytes == slice
7 }
8
9 fn _bytebuf_eq_vec(bytebuf: ByteBuf, vec: Vec<u8>) -> bool {
10 bytebuf == vec
11 }
12
13 fn _bytes_eq_bytestring(bytes: &Bytes) -> bool {
14 bytes == b"..."
15 }