mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
clippy::complexity simplifications related to Iterators
This commit is contained in:
parent
bd407a9882
commit
ae7e55c1dd
12 changed files with 64 additions and 80 deletions
|
@ -38,7 +38,7 @@ impl<'a> InferenceContext<'a> {
|
|||
let field_tys = def.map(|it| self.db.field_types(it)).unwrap_or_default();
|
||||
let (pre, post) = match ellipsis {
|
||||
Some(idx) => subpats.split_at(idx),
|
||||
None => (&subpats[..], &[][..]),
|
||||
None => (subpats, &[][..]),
|
||||
};
|
||||
let post_idx_offset = field_tys.iter().count() - post.len();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue