Skip to content

Commit cc1a2c6

Browse files
committed
Use shared builder in stream-end tests
1 parent 3a6aae1 commit cc1a2c6

3 files changed

Lines changed: 27 additions & 9 deletions

File tree

tests/push_policies.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,15 @@ fn rt() -> Runtime {
1818
.expect("failed to build test runtime")
1919
}
2020

21+
#[expect(
22+
unused_braces,
23+
reason = "rustc false positive for single-line rstest fixtures"
24+
)]
25+
// allow(unfulfilled_lint_expectations): rustc occasionally fails to emit the expected
26+
// lint for single-line rstest fixtures on stable.
27+
#[allow(unfulfilled_lint_expectations)]
2128
#[fixture]
22-
fn builder() -> PushQueuesBuilder<u8> {
23-
support::builder::<u8>()
24-
}
29+
fn builder() -> PushQueuesBuilder<u8> { support::builder::<u8>() }
2530

2631
/// Verifies how queue policies log and drop when the queue is full.
2732
#[rstest]

tests/session_registry.rs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,23 @@ use wireframe::{
55
session::{ConnectionId, SessionRegistry},
66
};
77

8+
#[expect(
9+
unused_braces,
10+
reason = "rustc false positive for single-line rstest fixtures"
11+
)]
12+
// allow(unfulfilled_lint_expectations): rustc occasionally fails to emit the expected
13+
// lint for single-line rstest fixtures on stable.
14+
#[allow(unfulfilled_lint_expectations)]
815
#[fixture]
9-
fn registry() -> SessionRegistry<u8> {
10-
SessionRegistry::default()
11-
}
16+
fn registry() -> SessionRegistry<u8> { SessionRegistry::default() }
1217

18+
#[expect(
19+
unused_braces,
20+
reason = "rustc false positive for single-line rstest fixtures"
21+
)]
22+
// allow(unfulfilled_lint_expectations): rustc occasionally fails to emit the expected
23+
// lint for single-line rstest fixtures on stable.
24+
#[allow(unfulfilled_lint_expectations)]
1325
#[fixture]
1426
fn push_setup() -> (PushQueues<u8>, PushHandle<u8>) {
1527
PushQueues::<u8>::builder()

tests/stream_end.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
//! Tests for explicit end-of-stream signalling.
2+
3+
mod support;
4+
25
use std::sync::Arc;
36

47
use async_stream::try_stream;
@@ -17,9 +20,7 @@ use terminator::Terminator;
1720

1821
#[fixture]
1922
fn queues() -> (PushQueues<u8>, PushHandle<u8>) {
20-
PushQueues::<u8>::builder()
21-
.high_capacity(1)
22-
.low_capacity(1)
23+
support::builder::<u8>()
2324
.build()
2425
.expect("failed to build PushQueues")
2526
}

0 commit comments

Comments
 (0)