Skip to content

Commit

Permalink
chore: Fix new clippy lints in cargo 1.80.0-nightly (#1883)
Browse files Browse the repository at this point in the history
* chore: Fix new clippy lints in cargo 1.80.0-nightly (05364cb2f 2024-05-03)

* No need for `#[allow(clippy::mutable_key_type)]`

* No need for `build = "build.rs"`
  • Loading branch information
larseggert committed May 7, 2024
1 parent ebae88f commit 6979f01
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 13 deletions.
9 changes: 9 additions & 0 deletions fuzz/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

fn main() {
println!("cargo:rustc-check-cfg=cfg(fuzzing)");
}
1 change: 0 additions & 1 deletion neqo-common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[package]
name = "neqo-common"
build = "build.rs"
authors.workspace = true
homepage.workspace = true
repository.workspace = true
Expand Down
1 change: 0 additions & 1 deletion neqo-crypto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[package]
name = "neqo-crypto"
build = "build.rs"
authors.workspace = true
homepage.workspace = true
repository.workspace = true
Expand Down
1 change: 1 addition & 0 deletions neqo-crypto/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ fn setup_for_gecko() -> Vec<String> {
}

fn main() {
println!("cargo:rustc-check-cfg=cfg(nss_nodb)");
let flags = if cfg!(feature = "gecko") {
setup_for_gecko()
} else if let Ok(nss_dir) = env::var("NSS_DIR") {
Expand Down
6 changes: 3 additions & 3 deletions neqo-http3/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1271,11 +1271,11 @@ mod tests {
while let Some(event) = hconn.next_event() {
match event {
Http3ServerEvent::Headers { stream, .. } => {
assert!(!requests.contains_key(&stream));
requests.insert(stream, 0);
assert!(!requests.contains_key(&stream.stream_id()));
requests.insert(stream.stream_id(), 0);
}
Http3ServerEvent::Data { stream, .. } => {
assert!(requests.contains_key(&stream));
assert!(requests.contains_key(&stream.stream_id()));
}
Http3ServerEvent::DataWritable { .. }
| Http3ServerEvent::StreamReset { .. }
Expand Down
14 changes: 6 additions & 8 deletions neqo-http3/tests/httpconn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,14 +522,12 @@ fn fetch_noresponse_will_idletimeout() {
let mut done = false;
while !done {
while let Some(event) = hconn_c.next_event() {
if let Http3ClientEvent::StateChange(state) = event {
match state {
Http3State::Closing(error_code) | Http3State::Closed(error_code) => {
assert_eq!(error_code, CloseReason::Transport(Error::IdleTimeout));
done = true;
}
_ => {}
}
if let Http3ClientEvent::StateChange(
Http3State::Closing(error_code) | Http3State::Closed(error_code),
) = event
{
assert_eq!(error_code, CloseReason::Transport(Error::IdleTimeout));
done = true;
}
}

Expand Down
9 changes: 9 additions & 0 deletions neqo-transport/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

fn main() {
println!("cargo:rustc-check-cfg=cfg(fuzzing)");
}

0 comments on commit 6979f01

Please sign in to comment.