Skip to content

Commit

Permalink
Added missing IntoIterator trait for FixedVector
Browse files Browse the repository at this point in the history
  • Loading branch information
ethDreamer committed Dec 8, 2023
1 parent 2c603ec commit 4a022f5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/fixed_vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,15 @@ impl<'a, T, N: Unsigned> IntoIterator for &'a FixedVector<T, N> {
}
}

impl<T, N: Unsigned> IntoIterator for FixedVector<T, N> {
type Item = T;
type IntoIter = std::vec::IntoIter<T>;

fn into_iter(self) -> Self::IntoIter {
self.vec.into_iter()

Check warning on line 176 in src/fixed_vector.rs

View check run for this annotation

Codecov / codecov/patch

src/fixed_vector.rs#L175-L176

Added lines #L175 - L176 were not covered by tests
}
}

impl<T, N: Unsigned> tree_hash::TreeHash for FixedVector<T, N>
where
T: tree_hash::TreeHash,
Expand Down

0 comments on commit 4a022f5

Please sign in to comment.