aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-11-24 18:58:36 +0100
committerMartin Fischer <martin@push-f.com>2021-11-24 18:58:39 +0100
commitdcf7a21372f22011a6081c26ade0a78fb2f10b5a (patch)
tree0cd4f9039a80f5769821105cd6ae22233a19443f
parent8179dfab311b5e9555e34e6f42e58b1d3a3a4e08 (diff)
refactor: fix clippy::needless_range_loop
-rw-r--r--src/transform.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/transform.rs b/src/transform.rs
index ddab158..8de4c96 100644
--- a/src/transform.rs
+++ b/src/transform.rs
@@ -138,10 +138,10 @@ impl TypeConverter<'_> {
TransformError::ExpectedAtLeastNTypes(type_count),
));
}
- for i in type_count..args.len() {
- if iter_type(args[i]).any(match_assoc_type) {
+ for ty in args.iter().skip(type_count) {
+ if iter_type(ty).any(match_assoc_type) {
return Err((
- args[i].span(),
+ ty.span(),
TransformError::AssocTypeAfterFirstNTypes(
type_count,
last_seg.ident.clone(),