clippy::complexity simplifications related to Iterators

This commit is contained in:
Matthias Krüger 2021-03-21 13:13:34 +01:00
parent bd407a9882
commit ae7e55c1dd
12 changed files with 64 additions and 80 deletions

View file

@ -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();