diff --git a/Cargo.toml b/Cargo.toml index 95eb9df..bfe704d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "trident-storage" -version = "0.0.12" +version = "0.0.13" edition = "2021" [lib] diff --git a/src/storage.rs b/src/storage.rs index d6d2919..152fa76 100644 --- a/src/storage.rs +++ b/src/storage.rs @@ -327,11 +327,11 @@ impl Storage { pub async fn get(&self, key: &str) -> Result>> { if let Some(shard_config) = self.hash_ring.range(key, 1).into_iter().next() { let shard = &self.shards[&shard_config.name]; - return match shard.open_store(key).await { - Ok(Some(file)) => Ok(Some(Box::new(file))), - Ok(None) => Ok(None), - Err(e) => Err(Error::io_error(e)), - }; + match shard.open_store(key).await { + Ok(Some(file)) => return Ok(Some(Box::new(file))), + Err(e) => return Err(Error::io_error(e)), + Ok(None) => {} + } } let entry = self .iroh_doc