File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -90,20 +90,14 @@ impl KVStore for VssStore {
9090
9191 let resp =
9292 tokio:: task:: block_in_place ( || self . runtime . block_on ( self . client . get_object ( & request) ) )
93- . map_err ( |e| match e {
94- VssError :: NoSuchKeyError ( ..) => {
95- let msg = format ! (
96- "Failed to read from key {}/{}/{}: {}" ,
97- primary_namespace, secondary_namespace, key, e
98- ) ;
99- Error :: new ( ErrorKind :: NotFound , msg)
100- }
101- _ => {
102- let msg = format ! (
103- "Failed to read from key {}/{}/{}: {}" ,
104- primary_namespace, secondary_namespace, key, e
105- ) ;
106- Error :: new ( ErrorKind :: Other , msg)
93+ . map_err ( |e| {
94+ let msg = format ! (
95+ "Failed to read from key {}/{}/{}: {}" ,
96+ primary_namespace, secondary_namespace, key, e
97+ ) ;
98+ match e {
99+ VssError :: NoSuchKeyError ( ..) => Error :: new ( ErrorKind :: NotFound , msg) ,
100+ _ => Error :: new ( ErrorKind :: Other , msg) ,
107101 }
108102 } ) ?;
109103 Ok ( resp. value . unwrap ( ) . value )
You can’t perform that action at this time.
0 commit comments