We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89cfd34 commit 2b6d27dCopy full SHA for 2b6d27d
src/colorize.rs
@@ -118,14 +118,15 @@ pub fn colorize_to_array(diff: &Value) -> Vec<String> {
118
///
119
/// If `None`, there is no JSON structural difference to be formatted.
120
#[cfg(feature = "colorize")]
121
+#[must_use]
122
#[allow(clippy::module_name_repetitions)]
123
pub fn colorize(diff: &Value, is_color: bool) -> String {
124
use console::Style;
125
126
let mut output: Vec<String> = Vec::new();
127
128
let mut output_func = |color: &str, line: &str| {
- let color_line = format!("{}{}", color, line);
129
+ let color_line = format!("{color}{line}");
130
let str_output = if is_color {
131
match color {
132
"+" => format!("{}", Style::new().green().apply_to(color_line)),
0 commit comments