mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-18 09:15:37 +00:00
clippy
This commit is contained in:
@@ -271,7 +271,7 @@ fn multipath_cid_rotation() {
|
||||
let each_round: u64 = MAX_PATHS as u64 * CidQueue::LEN as u64;
|
||||
// The final round only pushes one set of CIDs with expires_before, the round is not run
|
||||
// to completion to wait for the expiry messages from the client.
|
||||
let final_round: u64 = MAX_PATHS as u64 * 1;
|
||||
let final_round: u64 = MAX_PATHS as u64;
|
||||
let path_new_cids = initial_batch + (round - 2) * each_round + final_round;
|
||||
debug_assert_eq!(path_new_cids, 73);
|
||||
assert_eq!(stats.frame_tx.path_new_connection_id, path_new_cids);
|
||||
|
||||
@@ -176,7 +176,7 @@ mod tests {
|
||||
if rng.random_bool(0.666) {
|
||||
// store
|
||||
let token = Bytes::from(vec![i]);
|
||||
println!("STORE {} {:?}", server_name, token);
|
||||
println!("STORE {server_name} {token:?}");
|
||||
if let Some((j, _)) = cache_1
|
||||
.iter()
|
||||
.enumerate()
|
||||
@@ -199,7 +199,7 @@ mod tests {
|
||||
cache_2.insert(&server_name.to_string(), token);
|
||||
} else {
|
||||
// take
|
||||
println!("TAKE {}", server_name);
|
||||
println!("TAKE {server_name}");
|
||||
let expecting = cache_1
|
||||
.iter()
|
||||
.enumerate()
|
||||
@@ -213,7 +213,7 @@ mod tests {
|
||||
}
|
||||
token
|
||||
});
|
||||
println!("EXPECTING {:?}", expecting);
|
||||
println!("EXPECTING {expecting:?}");
|
||||
assert_eq!(cache_2.take(&server_name.to_string()), expecting);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,8 +47,7 @@ pub fn criterion_benchmark(c: &mut Criterion) {
|
||||
|
||||
for (gso_enabled, gro_enabled, recvmmsg_enabled) in permutations {
|
||||
let mut group = c.benchmark_group(format!(
|
||||
"gso_{}_gro_{}_recvmmsg_{}",
|
||||
gso_enabled, gro_enabled, recvmmsg_enabled
|
||||
"gso_{gso_enabled}_gro_{gro_enabled}_recvmmsg_{recvmmsg_enabled}"
|
||||
));
|
||||
group.throughput(criterion::Throughput::Bytes(TOTAL_BYTES as u64));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user