Skip to content

Commit ca57886

Browse files
authored
Merge pull request #9 from elichai/clippy
Style changes suggested by clippy
2 parents 557feab + ce6e5e5 commit ca57886

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/values.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ where
3636
Long(hashbag::HashBag<Aliased<T, D>, S>),
3737
}
3838

39-
impl<T, S> Into<Values<T, S>> for ValuesInner<T, S, crate::aliasing::NoDrop> {
40-
fn into(self) -> Values<T, S> {
41-
Values(self)
39+
impl<T, S> From<ValuesInner<T, S, crate::aliasing::NoDrop>> for Values<T, S> {
40+
fn from(v: ValuesInner<T, S, crate::aliasing::NoDrop>) -> Self {
41+
Values(v)
4242
}
4343
}
4444

@@ -346,10 +346,7 @@ where
346346
) -> Self {
347347
match &other {
348348
ValuesInner::Short(s) => {
349-
use std::iter::FromIterator;
350-
ValuesInner::Short(smallvec::SmallVec::from_iter(
351-
s.iter().map(|v| v.alias().change_drop()),
352-
))
349+
ValuesInner::Short(s.iter().map(|v| v.alias().change_drop()).collect())
353350
}
354351
ValuesInner::Long(l) => {
355352
let mut long = hashbag::HashBag::with_hasher(hasher.clone());

0 commit comments

Comments
 (0)