We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3eea6d commit 5ae53cfCopy full SHA for 5ae53cf
libs/zarts/src/lib.rs
@@ -45,15 +45,6 @@ use std::{
45
///
46
pub struct SortedSeq<T>(Vec<T>);
47
48
-impl<T> FromIterator<T> for SortedSeq<T>
49
-where
50
- T: Ord,
51
-{
52
- fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self {
53
- Self::new(iter.into_iter().collect())
54
- }
55
-}
56
-
57
impl<T> SortedSeq<T>
58
where
59
T: Ord,
@@ -86,6 +77,15 @@ where
86
77
}
87
78
88
79
80
+impl<T> FromIterator<T> for SortedSeq<T>
81
+where
82
+ T: Ord,
83
+{
84
+ fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self {
85
+ Self::new(iter.into_iter().collect())
+ }
+}
+
89
impl<T> Index<usize> for SortedSeq<T> {
90
type Output = T;
91
0 commit comments