From a6f2dd4058add46620ea829134146cc852c88dda Mon Sep 17 00:00:00 2001 From: ajakubowicz-canva Date: Sat, 21 Jun 2025 00:44:38 +1000 Subject: [PATCH 1/2] fix rustfmt edition --- fearless_simd_gen/src/main.rs | 6 +++--- rustfmt.toml | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 rustfmt.toml diff --git a/fearless_simd_gen/src/main.rs b/fearless_simd_gen/src/main.rs index b8224385..6eeb44ae 100644 --- a/fearless_simd_gen/src/main.rs +++ b/fearless_simd_gen/src/main.rs @@ -56,9 +56,9 @@ impl Module { } } - fn generate_string(self) -> String { + fn generate_string(self, name: &str) -> String { let code = self.generate_code(); - let parsed = syn::parse_file(&code.to_string()).expect("error parsing {name}"); + let parsed = syn::parse_file(&code.to_string()).expect(&format!("error parsing {name}")); let code_str = prettyplease::unparse(&parsed); format!("// This file is autogenerated by fearless_simd_gen\n\n{code_str}") } @@ -101,7 +101,7 @@ fn main() { let name = module.file_base(); let path = base_dir.join(format!("{name}.rs")); let file = File::create(&path).expect("error creating {path:?}"); - let code_str = module.generate_string(); + let code_str = module.generate_string(name); write_formatted(code_str.as_bytes(), file); } } diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 00000000..c5cf55d4 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1 @@ +style_edition = "2024" \ No newline at end of file From 5b4f48029c2a1d21506754dbe16c93efa590832e Mon Sep 17 00:00:00 2001 From: ajakubowicz-canva Date: Sat, 21 Jun 2025 00:47:31 +1000 Subject: [PATCH 2/2] change to edition --- rustfmt.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rustfmt.toml b/rustfmt.toml index c5cf55d4..f216078d 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1 +1 @@ -style_edition = "2024" \ No newline at end of file +edition = "2024"