fix a couple of clippy warnings:
filter_next manual_strip redundant_static_lifetimes single_char_pattern unnecessary_cast unused_unit op_ref redundant_closure useless_conversion
This commit is contained in:
parent
56293097f7
commit
bcd2f2df67
11 changed files with 14 additions and 21 deletions
|
@ -1886,9 +1886,8 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
|
|||
if snippet.starts_with('&') && !snippet.starts_with("&'") {
|
||||
introduce_suggestion
|
||||
.push((param.span, format!("&'a {}", &snippet[1..])));
|
||||
} else if snippet.starts_with("&'_ ") {
|
||||
introduce_suggestion
|
||||
.push((param.span, format!("&'a {}", &snippet[4..])));
|
||||
} else if let Some(stripped) = snippet.strip_prefix("&'_ ") {
|
||||
introduce_suggestion.push((param.span, format!("&'a {}", &stripped)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue