Corrected single-character string constant used as pattern found in dogfood test
This commit is contained in:
@@ -546,7 +546,7 @@ fn check_to_owned(cx: &LateContext<'_, '_>, expr: &Expr, other: &Expr) {
|
|||||||
} else if other_gets_derefed {
|
} else if other_gets_derefed {
|
||||||
// suggest dropping the to_owned on the left and the deref on the right
|
// suggest dropping the to_owned on the left and the deref on the right
|
||||||
let other_snippet = snippet(cx, other.span, "..").into_owned();
|
let other_snippet = snippet(cx, other.span, "..").into_owned();
|
||||||
let other_without_deref = other_snippet.trim_left_matches("*");
|
let other_without_deref = other_snippet.trim_left_matches('*');
|
||||||
|
|
||||||
(expr.span.to(other.span), format!("{} == {}", snip.to_string(), other_without_deref))
|
(expr.span.to(other.span), format!("{} == {}", snip.to_string(), other_without_deref))
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user