Skip to content

Commit 88ee209

Browse files
committed
Corrected single-character string constant used as pattern found in dogfood test
1 parent b0d7aea commit 88ee209

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/misc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ fn check_to_owned(cx: &LateContext<'_, '_>, expr: &Expr, other: &Expr) {
546546
} else if other_gets_derefed {
547547
// suggest dropping the to_owned on the left and the deref on the right
548548
let other_snippet = snippet(cx, other.span, "..").into_owned();
549-
let other_without_deref = other_snippet.trim_left_matches("*");
549+
let other_without_deref = other_snippet.trim_left_matches('*');
550550

551551
(expr.span.to(other.span), format!("{} == {}", snip.to_string(), other_without_deref))
552552
} else {

0 commit comments

Comments
 (0)