Skip to content

Commit 40005c8

Browse files
committed
ref: more clippy changes
1 parent dd3dfe7 commit 40005c8

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

cli/src/main.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ fn main() {
110110

111111
println!(
112112
"{}",
113-
format!("Watching directory: {}", dir_path)
113+
format!("Watching directory: {dir_path}")
114114
.bright_yellow()
115115
.bold()
116116
);
@@ -165,7 +165,7 @@ fn main() {
165165
}
166166
_ => {}
167167
},
168-
Err(e) => println!("Watch error: {:?}", e),
168+
Err(e) => println!("Watch error: {e:?}"),
169169
}
170170
}
171171
}
@@ -177,7 +177,7 @@ fn search_and_display_definitions(search_name: &str, parser: &Parser) {
177177
let mut total_matches = 0;
178178
println!(
179179
"{}",
180-
format!("Searching for definitions matching: '{}'", search_name)
180+
format!("Searching for definitions matching: '{search_name}'")
181181
.bright_yellow()
182182
.bold()
183183
);
@@ -240,7 +240,7 @@ fn search_and_display_definitions(search_name: &str, parser: &Parser) {
240240
index += 1;
241241
println!(
242242
"{} {}",
243-
format!("{}:", index).bright_blue(),
243+
format!("{index}:").bright_blue(),
244244
line.bright_green()
245245
);
246246
}
@@ -254,15 +254,15 @@ fn search_and_display_definitions(search_name: &str, parser: &Parser) {
254254
if !found_any {
255255
println!(
256256
"\n{}",
257-
format!("No definitions found matching '{}'", search_name)
257+
format!("No definitions found matching '{search_name}'")
258258
.red()
259259
.bold()
260260
);
261261
} else {
262262
println!("\n{}", "─".repeat(60).dimmed());
263263
println!(
264264
"{}",
265-
format!("Found {} matching definition(s)", total_matches).bright_yellow()
265+
format!("Found {total_matches} matching definition(s)").bright_yellow()
266266
);
267267
}
268268
}

cli/src/table.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ pub fn feature_table(feature: &Feature) {
200200
},
201201
)| ErrorRow {
202202
index: i + 1,
203-
definition_type: format!("{}", definition_type),
203+
definition_type: format!("{definition_type}"),
204204
definition: definition.clone(),
205205
error: error.clone(),
206206
},
@@ -355,8 +355,7 @@ pub fn summary_table(features: &[Feature]) {
355355
println!(
356356
"{}",
357357
format!(
358-
"PROCESS SUCCESSFUL! All {} feature(s) processed without errors.",
359-
total_features
358+
"PROCESS SUCCESSFUL! All {total_features} feature(s) processed without errors.",
360359
)
361360
.bright_green()
362361
.bold()
@@ -365,8 +364,7 @@ pub fn summary_table(features: &[Feature]) {
365364
println!(
366365
"{}",
367366
format!(
368-
"PROCESS FAILED! {} error(s) found across {} feature(s).",
369-
total_errors, total_features
367+
"PROCESS FAILED! {total_errors} error(s) found across {total_features} feature(s)."
370368
)
371369
.bright_red()
372370
.bold()

0 commit comments

Comments
 (0)