File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
linera-views/src/backends Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -321,21 +321,21 @@ where
321321 }
322322
323323 async fn create ( config : & Self :: Config , namespace : & str ) -> Result < ( ) , Self :: Error > {
324- let test1 = S1 :: exists ( & config. first_config , namespace)
324+ let exists1 = S1 :: exists ( & config. first_config , namespace)
325325 . await
326326 . map_err ( DualStoreError :: First ) ?;
327- let test2 = S2 :: exists ( & config. second_config , namespace)
327+ let exists2 = S2 :: exists ( & config. second_config , namespace)
328328 . await
329329 . map_err ( DualStoreError :: Second ) ?;
330- if test1 && test2 {
330+ if exists1 && exists2 {
331331 return Err ( DualStoreError :: StoreAlreadyExist ) ;
332332 }
333- if !test1 {
333+ if !exists1 {
334334 S1 :: create ( & config. first_config , namespace)
335335 . await
336336 . map_err ( DualStoreError :: First ) ?;
337337 }
338- if !test2 {
338+ if !exists2 {
339339 S2 :: create ( & config. second_config , namespace)
340340 . await
341341 . map_err ( DualStoreError :: Second ) ?;
Original file line number Diff line number Diff line change @@ -523,7 +523,7 @@ impl AdminKeyValueStore for RocksDbStoreInternal {
523523 let mut path_buf = config. path_with_guard . path_buf . clone ( ) ;
524524 path_buf. push ( namespace) ;
525525 if std:: path:: Path :: exists ( & path_buf) {
526- return Err ( RocksDbStoreInternalError :: StoreAlreadyExist ) ;
526+ return Err ( RocksDbStoreInternalError :: StoreAlreadyExists ) ;
527527 }
528528 std:: fs:: create_dir_all ( path_buf) ?;
529529 Ok ( ( ) )
@@ -562,9 +562,9 @@ impl TestKeyValueStore for RocksDbStoreInternal {
562562/// The error type for [`RocksDbStoreInternal`]
563563#[ derive( Error , Debug ) ]
564564pub enum RocksDbStoreInternalError {
565- /// Already existing storage
566- #[ error( "Already existing storag " ) ]
567- StoreAlreadyExist ,
565+ /// Store already exists
566+ #[ error( "Store already exists " ) ]
567+ StoreAlreadyExists ,
568568
569569 /// Tokio join error in RocksDB.
570570 #[ error( "tokio join error: {0}" ) ]
You can’t perform that action at this time.
0 commit comments