Skip to content

Commit 6f01273

Browse files
committed
dogfood test passed
1 parent 73039f6 commit 6f01273

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

clippy_lints/src/non_zero_suggestions.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,12 @@ fn suggest_non_zero_conversion(
8787
target_non_zero_type: &str,
8888
arg_snippet: &str,
8989
) {
90-
let suggestion = format!("{}::{}({})", target_non_zero_type, fn_name, arg_snippet);
90+
let suggestion = format!("{target_non_zero_type}::{fn_name}({arg_snippet})");
9191
span_lint_and_sugg(
9292
cx,
9393
NON_ZERO_SUGGESTIONS,
9494
expr.span,
95-
format!(
96-
"Consider using `{}::{}()` for more efficient and type-safe conversion",
97-
target_non_zero_type, fn_name
98-
),
95+
format!("Consider using `{target_non_zero_type}::{fn_name}()` for more efficient and type-safe conversion"),
9996
"Replace with",
10097
suggestion,
10198
Applicability::MachineApplicable,

0 commit comments

Comments
 (0)