Skip to content

Commit

Permalink
clippy: Add an allow to work around a clippy bug
Browse files Browse the repository at this point in the history
clippy in current stable thinks
  |(a, b)| (a, b)
is always the identity function, but due to match ergonomics, it might
be an implicit copy.

This is fixed in nightly by
  rust-lang/rust-clippy#11792
  • Loading branch information
ijackson committed Jan 2, 2024
1 parent 0ce386a commit 6e47386
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/tor-netdir/src/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,9 @@ mod test {
}

#[test]
// TODO remove when this upstream bug is fixed
/// https://github.com/rust-lang/rust-clippy/issues/11764
#[allow(clippy::map_identity)]
fn all_parameters() {
use std::time::Duration;
let mut p = NetParameters::default();
Expand Down

0 comments on commit 6e47386

Please sign in to comment.