11use redis_module:: {
22 redis_module, BlockedClient , CallOptionResp , CallOptionsBuilder , CallReply , CallResult ,
3- Context , FutureCallReply , PromiseCallReply , RedisError , RedisString , RedisValue ,
4- RedisValueResult , ThreadSafeContext ,
3+ Context , FutureCallReply , PromiseCallReply , RedisError , RedisResult , RedisString , RedisValue ,
4+ ThreadSafeContext ,
55} ;
66
77use std:: thread;
88
9- fn call_test ( ctx : & Context , _: Vec < RedisString > ) -> RedisValueResult {
9+ fn call_test ( ctx : & Context , _: Vec < RedisString > ) -> RedisResult {
1010 let res: String = ctx. call ( "ECHO" , & [ "TEST" ] ) ?. try_into ( ) ?;
1111 if "TEST" != & res {
1212 return Err ( RedisError :: Str ( "Failed calling 'ECHO TEST'" ) ) ;
@@ -126,7 +126,7 @@ fn call_blocking_handle_future(ctx: &Context, f: FutureCallReply, blocked_client
126126 future_handler. dispose ( ctx) ;
127127}
128128
129- fn call_blocking ( ctx : & Context , _: Vec < RedisString > ) -> RedisValueResult {
129+ fn call_blocking ( ctx : & Context , _: Vec < RedisString > ) -> RedisResult {
130130 let res = call_blocking_internal ( ctx) ;
131131 match res {
132132 PromiseCallReply :: Resolved ( r) => r. map_or_else ( |e| Err ( e. into ( ) ) , |v| Ok ( ( & v) . into ( ) ) ) ,
@@ -138,7 +138,7 @@ fn call_blocking(ctx: &Context, _: Vec<RedisString>) -> RedisValueResult {
138138 }
139139}
140140
141- fn call_blocking_from_detach_ctx ( ctx : & Context , _: Vec < RedisString > ) -> RedisValueResult {
141+ fn call_blocking_from_detach_ctx ( ctx : & Context , _: Vec < RedisString > ) -> RedisResult {
142142 let blocked_client = ctx. block_client ( ) ;
143143 thread:: spawn ( move || {
144144 let ctx_guard = redis_module:: MODULE_CONTEXT . lock ( ) ;
0 commit comments