From 9c1657134736b9deb1563d5d6cabe8f06904a8aa Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Mon, 28 Dec 2020 16:56:39 +0100 Subject: [PATCH] bat --list-languages: remove unnecessary format!() call To trigger/verify the changed code, run bat --list-languages # or -L This is the last clippy warning in the code that you get if you run cargo clippy --all-targets --all-features -- --allow clippy::style so by fixing it it becomes easier to spot when a new warning is introduced (that does not belong to the clippy category clippy::style). And by making it easy to spot new warnings, we increase chance of such regressions not ending up in the code base. --- src/bin/bat/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/bat/main.rs b/src/bin/bat/main.rs index 7a71d83a..af8ca787 100644 --- a/src/bin/bat/main.rs +++ b/src/bin/bat/main.rs @@ -162,7 +162,7 @@ pub fn get_languages(config: &Config) -> Result { num_chars += new_chars; result += &format!("{}", style.paint(&word[..])); if extension.peek().is_some() { - result += &format!("{}", comma_separator); + result += comma_separator; } } result += "\n";