Skip to content

Commit b88ee09

Browse files
committed
chore: clippy
1 parent 36a8365 commit b88ee09

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/impls/arc.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ mod tests {
106106
assert_eq!(input.to_vec(), writer.inner.into_inner());
107107
}
108108

109+
type MyLimit<Predicate> =
110+
Limit<u16, Predicate, (Endian, BitSize), fn(&u16, (Endian, BitSize)) -> bool>;
111+
109112
// Note: Copied tests from vec.rs impl
110113
#[cfg(feature = "bits")]
111114
#[rstest(input, endian, bit_size, limit, expected, expected_rest_bits, expected_rest_bytes, expected_write,
@@ -120,7 +123,7 @@ mod tests {
120123
input: &[u8],
121124
endian: Endian,
122125
bit_size: Option<usize>,
123-
limit: Limit<u16, Predicate, (Endian, BitSize), fn(&u16, (Endian, BitSize)) -> bool>,
126+
limit: MyLimit<Predicate>,
124127
expected: Arc<[u16]>,
125128
expected_rest_bits: &bitvec::slice::BitSlice<u8, bitvec::prelude::Msb0>,
126129
expected_rest_bytes: &[u8],

src/impls/vec.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@ mod tests {
306306
assert_eq!(expected_rest_bytes, buf);
307307
}
308308

309+
type MyLimit4<Predicate> =
310+
Limit<u8, Predicate, (Endian, BitSize), fn(&u8, (Endian, BitSize)) -> bool>;
311+
309312
#[cfg(all(feature = "bits", feature = "descriptive-errors"))]
310313
#[rstest(input, endian, bit_size, limit, expected, expected_rest_bits, expected_rest_bytes,
311314
case::count_0([0xAA].as_ref(), Endian::Little, Some(8), 0.into(), vec![], bits![u8, Msb0;], &[0xaa]),
@@ -330,7 +333,7 @@ mod tests {
330333
input: &[u8],
331334
endian: Endian,
332335
bit_size: Option<usize>,
333-
limit: Limit<u8, Predicate, (Endian, BitSize), fn(&u8, (Endian, BitSize)) -> bool>,
336+
limit: MyLimit4<Predicate>,
334337
expected: Vec<u8>,
335338
expected_rest_bits: &BitSlice<u8, Msb0>,
336339
expected_rest_bytes: &[u8],

0 commit comments

Comments
 (0)