Fix clippy lints (May 2025) (#841)
Signed-off-by: Nico Burns <nico@nicoburns.com>
f391b9f5cc6180289e39ae539e362aea99e689b1 · por Nico Burns · (hace 1 año) · padre 3d585ec1c · ver el árbol en este commit
Delta semántico · 1
scripts/gentest/src/main.rs
- cambió por dentro fn main
diff --git a/scripts/gentest/src/main.rs b/scripts/gentest/src/main.rs
index f2e825f3a..41c8da518 100644
--- a/scripts/gentest/src/main.rs
+++ b/scripts/gentest/src/main.rs
@@ -138,7 +138,7 @@ async fn main() {
let ident = Ident::new(test_path_stripped.to_str().unwrap(), Span::call_site());
let token = quote!(mod #ident;);
- writeln!(&mut base_mod_file, "{}", token).unwrap();
+ writeln!(&mut base_mod_file, "{token}").unwrap();
}
// Open mod file in current folder
let mod_path = test_path.join("mod.rs");
@@ -150,7 +150,7 @@ async fn main() {
} else {
quote!(mod #name_ident;)
};
- writeln!(&mut mod_file, "{}", token).unwrap();
+ writeln!(&mut mod_file, "{token}").unwrap();
let mut test_filename = test_path.join(&name);
test_filename.set_extension("rs");
debug!("writing {} to disk...", &name);
diff --git a/src/style/compact_length.rs b/src/style/compact_length.rs
index 0a4b7f799..75df2cf71 100644
--- a/src/style/compact_length.rs
+++ b/src/style/compact_length.rs
@@ -10,7 +10,8 @@ use crate::style_helpers::{
/// strict pointer provenance
mod compat {
#![allow(unsafe_code)]
- #![allow(clippy::transmute_float_to_int)]
+ #![allow(unknown_lints)]
+ #![allow(unnecessary_transmutes)]
/// Raw transmutation from `f32` to `u32`.
pub const fn f32_to_bits(val: f32) -> u32 {