@@ -65,7 +65,7 @@ impl Client {
6565 /// * `Ok(HashMap<String, Vec<u8>>)` if the HELLO command is successful
6666 /// * `Err(RedisError)` if an error occurs
6767 pub async fn hello ( & mut self , proto : Option < u8 > ) -> Result < HashMap < String , Vec < u8 > > > {
68- let frame: Frame = Hello :: new ( proto) . into_stream ( ) ;
68+ let frame: Frame = Hello :: new ( proto) . try_into ( ) ? ;
6969
7070 self . conn
7171 . write_frame ( & frame)
@@ -122,7 +122,7 @@ impl Client {
122122 /// }
123123 /// ```
124124 pub async fn ping ( & mut self , msg : Option < & [ u8 ] > ) -> Result < Vec < u8 > > {
125- let frame: Frame = Ping :: new ( msg) . into_stream ( ) ;
125+ let frame: Frame = Ping :: new ( msg) . try_into ( ) ? ;
126126
127127 self . conn
128128 . write_frame ( & frame)
@@ -168,7 +168,7 @@ impl Client {
168168 /// }
169169 /// ```
170170 pub async fn get ( & mut self , key : & str ) -> Result < Option < Vec < u8 > > > {
171- let frame: Frame = Get :: new ( key) . into_stream ( ) ;
171+ let frame: Frame = Get :: new ( key) . try_into ( ) ? ;
172172
173173 self . conn
174174 . write_frame ( & frame)
@@ -215,7 +215,7 @@ impl Client {
215215 /// }
216216 /// ```
217217 pub async fn get_ex ( & mut self , key : & str , expiry : Option < Expiry > ) -> Result < Option < Vec < u8 > > > {
218- let frame: Frame = GetEx :: new ( key, expiry) . into_stream ( ) ;
218+ let frame: Frame = GetEx :: new ( key, expiry) . try_into ( ) ? ;
219219
220220 self . conn . write_frame ( & frame) . await ?;
221221
@@ -272,7 +272,7 @@ impl Client {
272272 /// let resp = client.set("mykey", "myvalue").await?;
273273 /// }
274274 pub async fn set ( & mut self , key : & str , val : & [ u8 ] ) -> Result < Option < Vec < u8 > > > {
275- let frame: Frame = Set :: new ( key, val) . into_stream ( ) ;
275+ let frame: Frame = Set :: new ( key, val) . try_into ( ) ? ;
276276
277277 self . conn
278278 . write_frame ( & frame)
@@ -349,7 +349,7 @@ impl Client {
349349 /// let resp = client.del(vec!["foo", "bar", "baz"]).await?;
350350 /// }
351351 pub async fn del ( & mut self , keys : Vec < & str > ) -> Result < u64 > {
352- let frame: Frame = Del :: new ( keys) . into_stream ( ) ;
352+ let frame: Frame = Del :: new ( keys) . try_into ( ) ? ;
353353
354354 self . conn
355355 . write_frame ( & frame)
@@ -390,7 +390,7 @@ impl Client {
390390 /// let resp = client.exists(vec!["foo", "bar", "baz"]).await?;
391391 /// }
392392 pub async fn exists ( & mut self , keys : Vec < & str > ) -> Result < u64 > {
393- let frame: Frame = Exists :: new ( keys) . into_stream ( ) ;
393+ let frame: Frame = Exists :: new ( keys) . try_into ( ) ? ;
394394
395395 self . conn
396396 . write_frame ( & frame)
@@ -434,7 +434,7 @@ impl Client {
434434 /// let resp = client.expire("mykey", 1).await?;
435435 /// }
436436 pub async fn expire ( & mut self , key : & str , seconds : i64 ) -> Result < u64 > {
437- let frame: Frame = Expire :: new ( key, seconds) . into_stream ( ) ;
437+ let frame: Frame = Expire :: new ( key, seconds) . try_into ( ) ? ;
438438
439439 self . conn
440440 . write_frame ( & frame)
@@ -477,7 +477,7 @@ impl Client {
477477 /// let resp = client.ttl("mykey").await?;
478478 /// }
479479 pub async fn ttl ( & mut self , key : & str ) -> Result < i64 > {
480- let frame: Frame = Ttl :: new ( key) . into_stream ( ) ;
480+ let frame: Frame = Ttl :: new ( key) . try_into ( ) ? ;
481481
482482 self . conn
483483 . write_frame ( & frame)
@@ -519,7 +519,7 @@ impl Client {
519519 /// let resp = client.incr("mykey").await?;
520520 /// }
521521 pub async fn incr ( & mut self , key : & str ) -> Result < i64 > {
522- let frame: Frame = Incr :: new ( key) . into_stream ( ) ;
522+ let frame: Frame = Incr :: new ( key) . try_into ( ) ? ;
523523
524524 self . conn
525525 . write_frame ( & frame)
@@ -591,7 +591,7 @@ impl Client {
591591 /// let resp = client.decr("mykey").await?;
592592 /// }
593593 pub async fn decr ( & mut self , key : & str ) -> Result < i64 > {
594- let frame: Frame = Decr :: new ( key) . into_stream ( ) ;
594+ let frame: Frame = Decr :: new ( key) . try_into ( ) ? ;
595595
596596 self . conn
597597 . write_frame ( & frame)
@@ -664,7 +664,7 @@ impl Client {
664664 /// let resp = client.lpush("mykey", vec!["foo", "bar", "baz"]).await?;
665665 /// }
666666 pub async fn lpush ( & mut self , key : & str , values : Vec < & [ u8 ] > ) -> Result < u64 > {
667- let frame: Frame = LPush :: new ( key, values) . into_stream ( ) ;
667+ let frame: Frame = LPush :: new ( key, values) . try_into ( ) ? ;
668668
669669 self . conn
670670 . write_frame ( & frame)
@@ -706,7 +706,7 @@ impl Client {
706706 /// let resp = client.rpush("mykey", vec!["foo", "bar", "baz"]).await?;
707707 /// }
708708 pub async fn rpush ( & mut self , key : & str , values : Vec < & [ u8 ] > ) -> Result < u64 > {
709- let frame: Frame = RPush :: new ( key, values) . into_stream ( ) ;
709+ let frame: Frame = RPush :: new ( key, values) . try_into ( ) ? ;
710710
711711 self . conn
712712 . write_frame ( & frame)
@@ -750,7 +750,7 @@ impl Client {
750750 /// let resp = client.lpop("mykey", 1).await?;
751751 /// }
752752 pub async fn lpop ( & mut self , key : & str ) -> Result < Option < Vec < u8 > > > {
753- let frame: Frame = LPop :: new ( key, None ) . into_stream ( ) ;
753+ let frame: Frame = LPop :: new ( key, None ) . try_into ( ) ? ;
754754
755755 self . conn
756756 . write_frame ( & frame)
@@ -770,7 +770,7 @@ impl Client {
770770 }
771771
772772 pub async fn lpop_n ( & mut self , key : & str , count : u64 ) -> Result < Option < Vec < Vec < u8 > > > > {
773- let frame: Frame = LPop :: new ( key, Some ( count) ) . into_stream ( ) ;
773+ let frame: Frame = LPop :: new ( key, Some ( count) ) . try_into ( ) ? ;
774774
775775 self . conn
776776 . write_frame ( & frame)
@@ -815,7 +815,7 @@ impl Client {
815815 /// let resp = client.rpop("mykey", 1).await?;
816816 /// }
817817 pub async fn rpop ( & mut self , key : & str ) -> Result < Option < Vec < u8 > > > {
818- let frame: Frame = RPop :: new ( key, None ) . into_stream ( ) ;
818+ let frame: Frame = RPop :: new ( key, None ) . try_into ( ) ? ;
819819
820820 self . conn
821821 . write_frame ( & frame)
@@ -835,7 +835,7 @@ impl Client {
835835 }
836836
837837 pub async fn rpop_n ( & mut self , key : & str , count : u64 ) -> Result < Option < Vec < Vec < u8 > > > > {
838- let frame: Frame = RPop :: new ( key, Some ( count) ) . into_stream ( ) ;
838+ let frame: Frame = RPop :: new ( key, Some ( count) ) . try_into ( ) ? ;
839839
840840 self . conn
841841 . write_frame ( & frame)
@@ -881,7 +881,7 @@ impl Client {
881881 /// let resp = client.lrange("mykey", 0, -1).await?;
882882 /// }
883883 pub async fn lrange ( & mut self , key : & str , start : i64 , end : i64 ) -> Result < Vec < Vec < u8 > > > {
884- let frame: Frame = LRange :: new ( key, start, end) . into_stream ( ) ;
884+ let frame: Frame = LRange :: new ( key, start, end) . try_into ( ) ? ;
885885
886886 self . conn
887887 . write_frame ( & frame)
@@ -1363,7 +1363,6 @@ impl Client {
13631363 . collect :: < Vec < _ > > ( ) ;
13641364 result. concat ( )
13651365 }
1366- Frame :: Null => vec ! [ ] ,
13671366 _ => vec ! [ ] ,
13681367 } )
13691368 . collect ( ) ;
0 commit comments