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