File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -603,16 +603,8 @@ impl<S: Read + Write> Client<S> {
603
603
/// List all stickers from a given object, identified by type and uri
604
604
pub fn stickers ( & mut self , typ : & str , uri : & str ) -> Result < Vec < String > > {
605
605
self . run_command ( "sticker list" , ( typ, uri) )
606
- . and_then ( |_| {
607
- self . read_pairs ( )
608
- . filter ( |r| {
609
- r. as_ref ( )
610
- . map ( |& ( ref a, _) | * a == "sticker" )
611
- . unwrap_or ( true )
612
- } )
613
- . map ( |r| r. map ( |( _, b) | b. splitn ( 2 , '=' ) . nth ( 1 ) . map ( |s| s. to_owned ( ) ) . unwrap ( ) ) )
614
- . collect ( )
615
- } )
606
+ . and_then ( |_| self . read_list ( "sticker" ) )
607
+ . map ( |v| v. into_iter ( ) . map ( |b| b. splitn ( 2 , '=' ) . nth ( 1 ) . map ( |s| s. to_owned ( ) ) . unwrap ( ) ) . collect ( ) )
616
608
}
617
609
618
610
/// List all (file, sticker) pairs for sticker name and objects of given type
You can’t perform that action at this time.
0 commit comments