Skip to content

Commit db3c6cc

Browse files
committed
style: wrap two long assert! calls in the queue tests
1 parent e9343a7 commit db3c6cc

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

crates/hiroz/src/queue.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ mod tests {
131131
fn zero_capacity_retains_one_sample() {
132132
let q = BoundedQueue::new(0);
133133

134-
assert!(q.push(1), "capacity 0 reports a drop even on the first push");
134+
assert!(
135+
q.push(1),
136+
"capacity 0 reports a drop even on the first push"
137+
);
135138
assert_eq!(q.len(), 1, "capacity 0 must retain one sample, not zero");
136139

137140
q.push(2);
@@ -146,7 +149,10 @@ mod tests {
146149
fn capacity_one_retains_one_sample_without_reporting_a_drop() {
147150
let q = BoundedQueue::new(1);
148151

149-
assert!(!q.push(1), "an empty capacity-1 queue must not report a drop");
152+
assert!(
153+
!q.push(1),
154+
"an empty capacity-1 queue must not report a drop"
155+
);
150156
assert_eq!(q.len(), 1);
151157

152158
assert!(q.push(2), "the second push evicts the first");

0 commit comments

Comments
 (0)