Skip to content

Commit 139b977

Browse files
committed
Cleanup
1 parent 2a45a2a commit 139b977

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/misc_early.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ impl EarlyLintPass for MiscEarly {
149149
"Try not to call a closure in the expression where it is declared.",
150150
|db| {
151151
if decl.inputs.is_empty() {
152-
let hint = format!("{}", snippet(cx, block.span, ".."));
152+
let hint = snippet(cx, block.span, "..").into_owned();
153153
db.span_suggestion(expr.span, "Try doing something like: ", hint);
154154
}
155155
});

0 commit comments

Comments
 (0)