@@ -43,6 +43,7 @@ mod map;
43
43
mod max_by;
44
44
mod min_by;
45
45
mod min_by_key;
46
+ mod ne;
46
47
mod next;
47
48
mod nth;
48
49
mod partial_cmp;
@@ -73,6 +74,7 @@ use lt::LtFuture;
73
74
use max_by:: MaxByFuture ;
74
75
use min_by:: MinByFuture ;
75
76
use min_by_key:: MinByKeyFuture ;
77
+ use ne:: NeFuture ;
76
78
use next:: NextFuture ;
77
79
use nth:: NthFuture ;
78
80
use partial_cmp:: PartialCmpFuture ;
@@ -1586,6 +1588,39 @@ extension_trait! {
1586
1588
CmpFuture :: new( self , other)
1587
1589
}
1588
1590
1591
+ #[ doc = r#"
1592
+ Determines if the elements of this `Stream` are lexicographically
1593
+ not equal to those of another.
1594
+ # Examples
1595
+ ```
1596
+ # fn main() { async_std::task::block_on(async {
1597
+ #
1598
+ use async_std::prelude::*;
1599
+ use std::collections::VecDeque;
1600
+ let single: VecDeque<isize> = vec![1].into_iter().collect();
1601
+ let single_ne: VecDeque<isize> = vec![10].into_iter().collect();
1602
+ let multi: VecDeque<isize> = vec![1,2].into_iter().collect();
1603
+ let multi_ne: VecDeque<isize> = vec![1,5].into_iter().collect();
1604
+ assert_eq!(single.clone().ne(single.clone()).await, false);
1605
+ assert_eq!(single_ne.clone().ne(single.clone()).await, true);
1606
+ assert_eq!(multi.clone().ne(single_ne.clone()).await, true);
1607
+ assert_eq!(multi_ne.clone().ne(multi.clone()).await, true);
1608
+ #
1609
+ # }) }
1610
+ ```
1611
+ "# ]
1612
+ fn ne<S >(
1613
+ self ,
1614
+ other: S
1615
+ ) -> impl Future <Output = bool > [ NeFuture <Self , S >]
1616
+ where
1617
+ Self : Sized + Stream ,
1618
+ S : Sized + Stream ,
1619
+ <Self as Stream >:: Item : PartialEq <S :: Item >,
1620
+ {
1621
+ NeFuture :: new( self , other)
1622
+ }
1623
+
1589
1624
#[ doc = r#"
1590
1625
Determines if the elements of this `Stream` are lexicographically
1591
1626
greater than or equal to those of another.
0 commit comments