Skip to content

Commit

Permalink
fix warning by using iter() instead of into_iter()
Browse files Browse the repository at this point in the history
Change into_iter() to iter() in impl_zip_iter macro
to avoid the compliation warning related to
s://github.com/rust-lang/rust/issues/66145.
  • Loading branch information
dmitris committed Sep 20, 2020
1 parent 180c4e0 commit c0c4ef8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ziptuple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ pub struct Zip<T> {
/// assert_eq!(results, [0 + 3, 10 + 7, 29, 36]);
/// ```
pub fn multizip<T, U>(t: U) -> Zip<T>
where Zip<T>: From<U>,
Zip<T>: Iterator,
where
Zip<T>: From<U>,
Zip<T>: Iterator,
{
Zip::from(t)
}
Expand Down Expand Up @@ -108,7 +109,7 @@ macro_rules! impl_zip_iter {
#[inline]
fn next_back(&mut self) -> Option<Self::Item> {
let ($(ref mut $B,)*) = self.t;
let size = *[$( $B.len(), )*].into_iter().min().unwrap();
let size = *[$( $B.len(), )*].iter().min().unwrap();

$(
if $B.len() != size {
Expand Down

0 comments on commit c0c4ef8

Please sign in to comment.