Corrected single-character string constant used as pattern found in dogfood test

This commit is contained in:
Josh Mcguigan 2018-10-09 20:01:12 -07:00
parent b0d7aea946
commit 88ee209a1d

View File

@ -546,7 +546,7 @@ fn check_to_owned(cx: &LateContext<'_, '_>, expr: &Expr, other: &Expr) {
} else if other_gets_derefed {
// 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_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))
} else {