@@ -32,6 +32,7 @@ mod find_map;
3232mod fold;
3333mod for_each;
3434mod fuse;
35+ mod gt;
3536mod inspect;
3637mod map;
3738mod min_by;
@@ -55,6 +56,7 @@ use find::FindFuture;
5556use find_map:: FindMapFuture ;
5657use fold:: FoldFuture ;
5758use for_each:: ForEachFuture ;
59+ use gt:: GtFuture ;
5860use min_by:: MinByFuture ;
5961use next:: NextFuture ;
6062use nth:: NthFuture ;
@@ -1231,6 +1233,7 @@ extension_trait! {
12311233 #
12321234 use async_std::prelude::*;
12331235 use std::collections::VecDeque;
1236+
12341237 use std::cmp::Ordering;
12351238 let s1 = VecDeque::from(vec![1]);
12361239 let s2 = VecDeque::from(vec![1, 2]);
@@ -1256,6 +1259,43 @@ extension_trait! {
12561259 {
12571260 PartialCmpFuture :: new( self , other)
12581261 }
1262+
1263+ #[ doc = r#"
1264+ Determines if the elements of this `Stream` are lexicographically
1265+ greater than those of another.
1266+
1267+ # Examples
1268+ ```
1269+ # fn main() { async_std::task::block_on(async {
1270+ #
1271+ use async_std::prelude::*;
1272+ use std::collections::VecDeque;
1273+
1274+ let single = VecDeque::from(vec![1]);
1275+ let single_gt = VecDeque::from(vec![10]);
1276+ let multi = VecDeque::from(vec![1,2]);
1277+ let multi_gt = VecDeque::from(vec![1,5]);
1278+
1279+ assert_eq!(single.clone().gt(single.clone()).await, false);
1280+ assert_eq!(single_gt.clone().gt(single.clone()).await, true);
1281+ assert_eq!(multi.clone().gt(single_gt.clone()).await, false);
1282+ assert_eq!(multi_gt.clone().gt(multi.clone()).await, true);
1283+
1284+ #
1285+ # }) }
1286+ ```
1287+ "# ]
1288+ fn gt<S >(
1289+ self ,
1290+ other: S
1291+ ) -> impl Future <Output = bool > + ' _ [ GtFuture <Self , S >]
1292+ where
1293+ Self : Sized + Stream ,
1294+ S : Stream ,
1295+ Self :: Item : PartialOrd <S :: Item >,
1296+ {
1297+ GtFuture :: new( self , other)
1298+ }
12591299 }
12601300
12611301 impl <S : Stream + Unpin + ?Sized > Stream for Box <S > {
0 commit comments