summaryrefslogtreecommitdiffstats
path: root/third_party/rust/serde_bytes/tests/test_partialeq.rs
blob: a57d194882f2a749757a554e5a3d4af53423dd97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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"..."
}