From ef9e4dc9a224baaee14f795801336db8727126d4 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Wed, 8 Jan 2025 18:20:52 +0200 Subject: [PATCH] chore: Enable clippy `pathbuf_init_then_push` lint (#2324) And fix the warnings. --- Cargo.toml | 1 + neqo-bin/src/lib.rs | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 414c831e90..7899277091 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,6 +44,7 @@ nursery = { level = "warn", priority = -1 } pedantic = { level = "warn", priority = -1 } if_then_some_else_none = "warn" get_unwrap = "warn" +pathbuf_init_then_push = "warn" # Optimize build dependencies, because bindgen and proc macros / style # compilation take more to run than to build otherwise. diff --git a/neqo-bin/src/lib.rs b/neqo-bin/src/lib.rs index 1a9f981780..4ae71b359c 100644 --- a/neqo-bin/src/lib.rs +++ b/neqo-bin/src/lib.rs @@ -276,8 +276,7 @@ mod tests { impl TempDir { fn new() -> Self { - let mut dir = std::env::temp_dir(); - dir.push(format!( + let dir = std::env::temp_dir().join(format!( "neqo-bin-test-{}", SystemTime::now() .duration_since(SystemTime::UNIX_EPOCH)