diff options
Diffstat (limited to 'third_party/rust/serde_bytes/tests/test_partialeq.rs')
-rw-r--r-- | third_party/rust/serde_bytes/tests/test_partialeq.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/third_party/rust/serde_bytes/tests/test_partialeq.rs b/third_party/rust/serde_bytes/tests/test_partialeq.rs new file mode 100644 index 0000000000..a57d194882 --- /dev/null +++ b/third_party/rust/serde_bytes/tests/test_partialeq.rs @@ -0,0 +1,15 @@ +#![allow(clippy::needless_pass_by_value)] + +use serde_bytes::{ByteBuf, Bytes}; + +fn _bytes_eq_slice(bytes: &Bytes, slice: &[u8]) -> bool { + bytes == slice +} + +fn _bytebuf_eq_vec(bytebuf: ByteBuf, vec: Vec<u8>) -> bool { + bytebuf == vec +} + +fn _bytes_eq_bytestring(bytes: &Bytes) -> bool { + bytes == b"..." +} |