From c212003f0b8e4d4b0b816547eb763f1c7eb15b13 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 31 Oct 2024 16:03:56 +0100 Subject: [PATCH] Use write_str Co-authored-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- dev-tools/gen-target-info/src/main.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dev-tools/gen-target-info/src/main.rs b/dev-tools/gen-target-info/src/main.rs index 8723ecff..7d34dc10 100644 --- a/dev-tools/gen-target-info/src/main.rs +++ b/dev-tools/gen-target-info/src/main.rs @@ -13,9 +13,7 @@ const PRELUDE: &str = r#"//! This file is generated code. Please edit the genera fn generate_target_mapping(f: &mut File, target_specs: &RustcTargetSpecs) -> std::io::Result<()> { writeln!(f, "use super::Target;")?; writeln!(f)?; - writeln!( - f, - "pub(crate) fn get(target_triple: &str) -> Option {{" + f.write_str("pub(crate) fn get(target_triple: &str) -> Option {" )?; writeln!(f, " Some(match target_triple {{")?;