avoid full-slicing slices
If we already have a slice, there is no need to get another full-range slice from that, just use the original. clippy::redundant_slicing
This commit is contained in:
@@ -1105,7 +1105,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
|
||||
}
|
||||
|
||||
if let Some(items) = self.diagnostic_metadata.current_trait_assoc_items {
|
||||
for assoc_item in &items[..] {
|
||||
for assoc_item in items {
|
||||
if assoc_item.ident == ident {
|
||||
return Some(match &assoc_item.kind {
|
||||
ast::AssocItemKind::Const(..) => AssocSuggestion::AssocConst,
|
||||
|
||||
Reference in New Issue
Block a user