Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.9.0 with backports from master #231

Merged
merged 19 commits into from
Jun 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use prelude FromIterator
(cherry picked from commit ffd875b)
  • Loading branch information
cuviper committed Jun 16, 2022
commit 73932eff245248fd89356f1efe4d4f92784eb3ec
1 change: 0 additions & 1 deletion benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use test::Bencher;
use indexmap::IndexMap;

use std::collections::HashMap;
use std::iter::FromIterator;

use rand::rngs::SmallRng;
use rand::seq::SliceRandom;
Expand Down
1 change: 0 additions & 1 deletion benches/faststring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use test::Bencher;
use indexmap::IndexMap;

use std::collections::HashMap;
use std::iter::FromIterator;

use rand::rngs::SmallRng;
use rand::seq::SliceRandom;
Expand Down
4 changes: 2 additions & 2 deletions src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::vec::{self, Vec};
use ::core::cmp::Ordering;
use ::core::fmt;
use ::core::hash::{BuildHasher, Hash, Hasher};
use ::core::iter::{FromIterator, FusedIterator};
use ::core::iter::FusedIterator;
use ::core::ops::{Index, IndexMut, RangeBounds};
use ::core::slice::{Iter as SliceIter, IterMut as SliceIterMut};

Expand Down Expand Up @@ -1406,7 +1406,7 @@ where
/// assert_eq!(map1, map2);
/// ```
fn from(arr: [(K, V); N]) -> Self {
std::array::IntoIter::new(arr).collect()
Self::from_iter(arr)
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::vec::{self, Vec};
use core::cmp::Ordering;
use core::fmt;
use core::hash::{BuildHasher, Hash};
use core::iter::{Chain, FromIterator, FusedIterator};
use core::iter::{Chain, FusedIterator};
use core::ops::{BitAnd, BitOr, BitXor, Index, RangeBounds, Sub};
use core::slice;

Expand Down Expand Up @@ -903,7 +903,7 @@ where
/// assert_eq!(set1, set2);
/// ```
fn from(arr: [T; N]) -> Self {
std::array::IntoIter::new(arr).collect()
Self::from_iter(arr)
}
}

Expand Down
1 change: 0 additions & 1 deletion test-nostd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use core::hash::BuildHasherDefault;
use core::hash::Hasher;
use core::iter::FromIterator;

use indexmap::IndexMap;
use indexmap::IndexSet;
Expand Down
1 change: 0 additions & 1 deletion tests/quick.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use std::collections::HashMap;
use std::collections::HashSet;
use std::fmt::Debug;
use std::hash::Hash;
use std::iter::FromIterator;
use std::ops::Bound;
use std::ops::Deref;

Expand Down