From c5211edeec1e9a85c958a1ae738aef9abecd1399 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Sat, 8 Oct 2022 05:23:03 -0400 Subject: [PATCH] Apply clippy::uninlined_format_args fix --- tools/src/bin/convert_quotes.rs | 6 +++--- tools/src/bin/lfp.rs | 2 +- tools/src/bin/link2print.rs | 6 +++--- tools/src/bin/release_listings.rs | 2 +- tools/src/bin/remove_hidden_lines.rs | 4 ++-- tools/src/bin/remove_links.rs | 4 ++-- tools/src/bin/remove_markup.rs | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tools/src/bin/convert_quotes.rs b/tools/src/bin/convert_quotes.rs index b4a9bdce2e..a6a8dae72b 100644 --- a/tools/src/bin/convert_quotes.rs +++ b/tools/src/bin/convert_quotes.rs @@ -8,7 +8,7 @@ fn main() { let mut buffer = String::new(); if let Err(e) = io::stdin().read_to_string(&mut buffer) { - panic!("{}", e); + panic!("{e}"); } for line in buffer.lines() { @@ -21,7 +21,7 @@ fn main() { if is_in_code_block { is_in_inline_code = false; is_in_html_tag = false; - println!("{}", line); + println!("{line}"); } else { let modified_line = &mut String::new(); let mut previous_char = std::char::REPLACEMENT_CHARACTER; @@ -72,7 +72,7 @@ fn main() { modified_line.push(char_to_push); previous_char = char_to_push; } - println!("{}", modified_line); + println!("{modified_line}"); } } } diff --git a/tools/src/bin/lfp.rs b/tools/src/bin/lfp.rs index c4d4bce036..f7b6e17f72 100644 --- a/tools/src/bin/lfp.rs +++ b/tools/src/bin/lfp.rs @@ -18,7 +18,7 @@ fn main() { .map(|entry| match entry { Ok(entry) => entry, Err(err) => { - eprintln!("{:?}", err); + eprintln!("{err:?}"); std::process::exit(911) } }) diff --git a/tools/src/bin/link2print.rs b/tools/src/bin/link2print.rs index c57d788d21..7d6def8616 100644 --- a/tools/src/bin/link2print.rs +++ b/tools/src/bin/link2print.rs @@ -14,12 +14,12 @@ fn read_md() -> String { let mut buffer = String::new(); match io::stdin().read_to_string(&mut buffer) { Ok(_) => buffer, - Err(error) => panic!("{}", error), + Err(error) => panic!("{error}"), } } fn write_md(output: String) { - print!("{}", output); + print!("{output}"); } fn parse_references(buffer: String) -> (String, HashMap) { @@ -81,7 +81,7 @@ fn parse_links((buffer, ref_map): (String, HashMap)) -> String { } } }; - format!("{} at *{}*", name, val) + format!("{name} at *{val}*") } } }); diff --git a/tools/src/bin/release_listings.rs b/tools/src/bin/release_listings.rs index c371d7b308..4239a4dabf 100644 --- a/tools/src/bin/release_listings.rs +++ b/tools/src/bin/release_listings.rs @@ -149,7 +149,7 @@ fn copy_cleaned_rust_file( if !ANCHOR_OR_SNIP_COMMENTS.is_match(&line) && (item_name != "lib.rs" || !EMPTY_MAIN.is_match(&line)) { - writeln!(&mut to_buf, "{}", line)?; + writeln!(&mut to_buf, "{line}")?; } } diff --git a/tools/src/bin/remove_hidden_lines.rs b/tools/src/bin/remove_hidden_lines.rs index dc3c593570..934b64eb69 100644 --- a/tools/src/bin/remove_hidden_lines.rs +++ b/tools/src/bin/remove_hidden_lines.rs @@ -9,12 +9,12 @@ fn read_md() -> String { let mut buffer = String::new(); match io::stdin().read_to_string(&mut buffer) { Ok(_) => buffer, - Err(error) => panic!("{}", error), + Err(error) => panic!("{error}"), } } fn write_md(output: String) { - print!("{}", output); + print!("{output}"); } fn remove_hidden_lines(input: &str) -> String { diff --git a/tools/src/bin/remove_links.rs b/tools/src/bin/remove_links.rs index b3f78d70a0..042295d187 100644 --- a/tools/src/bin/remove_links.rs +++ b/tools/src/bin/remove_links.rs @@ -8,7 +8,7 @@ use std::io::Read; fn main() { let mut buffer = String::new(); if let Err(e) = io::stdin().read_to_string(&mut buffer) { - panic!("{}", e); + panic!("{e}"); } let mut refs = HashSet::new(); @@ -41,5 +41,5 @@ fn main() { caps.get(0).unwrap().as_str().to_string() }); - print!("{}", out); + print!("{out}"); } diff --git a/tools/src/bin/remove_markup.rs b/tools/src/bin/remove_markup.rs index c42e588e75..a9cc4b7f59 100644 --- a/tools/src/bin/remove_markup.rs +++ b/tools/src/bin/remove_markup.rs @@ -12,12 +12,12 @@ fn read_md() -> String { let mut buffer = String::new(); match io::stdin().read_to_string(&mut buffer) { Ok(_) => buffer, - Err(error) => panic!("{}", error), + Err(error) => panic!("{error}"), } } fn write_md(output: String) { - print!("{}", output); + print!("{output}"); } fn remove_markup(input: String) -> String {