diff --git a/linera-views/src/backends/dual.rs b/linera-views/src/backends/dual.rs index 33218b061128..bc4b487231ba 100644 --- a/linera-views/src/backends/dual.rs +++ b/linera-views/src/backends/dual.rs @@ -321,21 +321,21 @@ where } async fn create(config: &Self::Config, namespace: &str) -> Result<(), Self::Error> { - let test1 = S1::exists(&config.first_config, namespace) + let exists1 = S1::exists(&config.first_config, namespace) .await .map_err(DualStoreError::First)?; - let test2 = S2::exists(&config.second_config, namespace) + let exists2 = S2::exists(&config.second_config, namespace) .await .map_err(DualStoreError::Second)?; - if test1 && test2 { + if exists1 && exists2 { return Err(DualStoreError::StoreAlreadyExist); } - if !test1 { + if !exists1 { S1::create(&config.first_config, namespace) .await .map_err(DualStoreError::First)?; } - if !test2 { + if !exists2 { S2::create(&config.second_config, namespace) .await .map_err(DualStoreError::Second)?; diff --git a/linera-views/src/backends/rocks_db.rs b/linera-views/src/backends/rocks_db.rs index df80a3e3ee58..7a89856e1e5b 100644 --- a/linera-views/src/backends/rocks_db.rs +++ b/linera-views/src/backends/rocks_db.rs @@ -523,7 +523,7 @@ impl AdminKeyValueStore for RocksDbStoreInternal { let mut path_buf = config.path_with_guard.path_buf.clone(); path_buf.push(namespace); if std::path::Path::exists(&path_buf) { - return Err(RocksDbStoreInternalError::StoreAlreadyExist); + return Err(RocksDbStoreInternalError::StoreAlreadyExists); } std::fs::create_dir_all(path_buf)?; Ok(()) @@ -562,9 +562,9 @@ impl TestKeyValueStore for RocksDbStoreInternal { /// The error type for [`RocksDbStoreInternal`] #[derive(Error, Debug)] pub enum RocksDbStoreInternalError { - /// Already existing storage - #[error("Already existing storag")] - StoreAlreadyExist, + /// Store already exists + #[error("Store already exists")] + StoreAlreadyExists, /// Tokio join error in RocksDB. #[error("tokio join error: {0}")]