mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-09-21 15:11:56 +00:00
Corrected single-character string constant used as pattern found in dogfood test
This commit is contained in:
parent
b0d7aea946
commit
88ee209a1d
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue