@@ -40,7 +40,7 @@ impl VssStore {
4040
4141 fn extract_key ( & self , unified_key : & str ) -> io:: Result < String > {
4242 let mut parts = unified_key. splitn ( 3 , '#' ) ;
43- let ( _ , _ ) = ( parts. next ( ) , parts. next ( ) ) ; // Discard primary_namespace & secondary_namespace
43+ let ( _primary_namespace , _secondary_namespace ) = ( parts. next ( ) , parts. next ( ) ) ;
4444 match parts. next ( ) {
4545 Some ( actual_key) => Ok ( actual_key. to_string ( ) ) ,
4646 None => Err ( Error :: new ( ErrorKind :: InvalidData , "Invalid key format" ) ) ,
@@ -84,7 +84,7 @@ impl KVStore for VssStore {
8484 ) -> io:: Result < Vec < u8 > > {
8585 check_namespace_key_validity ( primary_namespace, secondary_namespace, Some ( key) , "read" ) ?;
8686 let request = GetObjectRequest {
87- store_id : self . store_id . to_string ( ) ,
87+ store_id : self . store_id . clone ( ) ,
8888 key : self . build_key ( primary_namespace, secondary_namespace, key) ?,
8989 } ;
9090
@@ -93,7 +93,7 @@ impl KVStore for VssStore {
9393 . map_err ( |e| match e {
9494 VssError :: NoSuchKeyError ( ..) => {
9595 let msg = format ! (
96- "Failed to read as key could not be found: {}/{}/{}. Details : {}" ,
96+ "Failed to read from key {}/{}/{}: {}" ,
9797 primary_namespace, secondary_namespace, key, e
9898 ) ;
9999 Error :: new ( ErrorKind :: NotFound , msg)
@@ -114,7 +114,7 @@ impl KVStore for VssStore {
114114 ) -> io:: Result < ( ) > {
115115 check_namespace_key_validity ( primary_namespace, secondary_namespace, Some ( key) , "write" ) ?;
116116 let request = PutObjectRequest {
117- store_id : self . store_id . to_string ( ) ,
117+ store_id : self . store_id . clone ( ) ,
118118 global_version : None ,
119119 transaction_items : vec ! [ KeyValue {
120120 key: self . build_key( primary_namespace, secondary_namespace, key) ?,
@@ -141,7 +141,7 @@ impl KVStore for VssStore {
141141 ) -> io:: Result < ( ) > {
142142 check_namespace_key_validity ( primary_namespace, secondary_namespace, Some ( key) , "remove" ) ?;
143143 let request = DeleteObjectRequest {
144- store_id : self . store_id . to_string ( ) ,
144+ store_id : self . store_id . clone ( ) ,
145145 key_value : Some ( KeyValue {
146146 key : self . build_key ( primary_namespace, secondary_namespace, key) ?,
147147 version : -1 ,
0 commit comments