Skip to content

Commit

Permalink
chore: Fix clippy nightly warnings (#2080)
Browse files Browse the repository at this point in the history
  • Loading branch information
larseggert authored Aug 29, 2024
1 parent 22370e7 commit 7e8d22d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions neqo-bin/src/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use std::{io, net::SocketAddr};
use neqo_common::Datagram;

/// Ideally this would live in [`neqo-udp`]. [`neqo-udp`] is used in Firefox.
///
/// Firefox uses `cargo vet`. [`tokio`] the dependency of [`neqo-udp`] is not
/// audited as `safe-to-deploy`. `cargo vet` will require `safe-to-deploy` for
/// [`tokio`] even when behind a feature flag.
Expand Down
1 change: 1 addition & 0 deletions neqo-crypto/src/replay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ scoped_ptr!(
);

/// `AntiReplay` is used by servers when processing 0-RTT handshakes.
///
/// It limits the exposure of servers to replay attack by rejecting 0-RTT
/// if it appears to be a replay. There is a false-positive rate that can be
/// managed by tuning the parameters used to create the context.
Expand Down
8 changes: 4 additions & 4 deletions neqo-transport/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,10 +452,10 @@ impl Paths {
// make a new RTT esimate and interrogate that.
// That is more expensive, but it should be rare and breaking encapsulation
// is worse, especially as this is only used in tests.
self.primary()
.map_or(RttEstimate::default().estimate(), |p| {
p.borrow().rtt().estimate()
})
self.primary().map_or_else(
|| RttEstimate::default().estimate(),
|p| p.borrow().rtt().estimate(),
)
}

pub fn set_qlog(&mut self, qlog: NeqoQlog) {
Expand Down
2 changes: 2 additions & 0 deletions test-fixture/src/sim/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ macro_rules! boxed {
}

/// Create a simulation test case. This takes either two or three arguments.
///
/// The two argument form takes a bare name (`ident`), a comma, and an array of
/// items that implement `Node`.
///
/// The three argument form adds a setup block that can be used to construct a
/// complex value that is then shared between all nodes. The values in the
/// three-argument form have to be closures (or functions) that accept a reference
Expand Down

0 comments on commit 7e8d22d

Please sign in to comment.