Skip to content

Commit ef7f477

Browse files
committed
test: satisfy current Rust iterator lints
1 parent 6490e14 commit ef7f477

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎crates/originweave-tls/tests/policy_contract.rs‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ fn trust_root_bundle_is_nonempty_bounded_deduplicated_and_hashed() {
6262
assert!(matches!(
6363
TrustRootBundle::new(
6464
TrustBundleIdentifier::parse("many:v1").expect("identifier"),
65-
std::iter::repeat(root.clone()).take(MAX_TRUST_ROOT_COUNT + 1),
65+
std::iter::repeat_n(root.clone(), MAX_TRUST_ROOT_COUNT + 1),
6666
),
6767
Err(TlsError::InvalidTrustRootCount { .. })
6868
));
@@ -119,9 +119,7 @@ fn tls_policy_bounds_timeouts_and_alpn() {
119119
let invalid_alpn_sets = [
120120
vec![Vec::new()],
121121
vec![b"h2".to_vec(), b"h2".to_vec()],
122-
std::iter::repeat(b"h2".to_vec())
123-
.take(MAX_ALPN_PROTOCOL_COUNT + 1)
124-
.collect(),
122+
std::iter::repeat_n(b"h2".to_vec(), MAX_ALPN_PROTOCOL_COUNT + 1).collect(),
125123
vec![vec![b'a'; MAX_ALPN_PROTOCOL_LENGTH + 1]],
126124
vec![vec![b'a'; MAX_ALPN_TOTAL_BYTES + 1]],
127125
];

0 commit comments

Comments
 (0)