From e9b1fa0302ecae0eda16d7722559c93428be6ceb Mon Sep 17 00:00:00 2001 From: WenyXu Date: Fri, 5 Jan 2024 06:46:45 +0000 Subject: [PATCH] chore: apply suggestions from CR --- src/mito2/src/cache/file_cache.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mito2/src/cache/file_cache.rs b/src/mito2/src/cache/file_cache.rs index fe282a26b9f7..58c789e119a2 100644 --- a/src/mito2/src/cache/file_cache.rs +++ b/src/mito2/src/cache/file_cache.rs @@ -23,7 +23,7 @@ use futures::{FutureExt, TryStreamExt}; use moka::future::Cache; use moka::notification::RemovalCause; use object_store::util::join_path; -use object_store::{ErrorKind, Metakey, ObjectStore, Reader, Result as ObjectStoreResult}; +use object_store::{ErrorKind, Metakey, ObjectStore, Reader}; use snafu::ResultExt; use store_api::storage::RegionId; @@ -100,7 +100,7 @@ impl FileCache { self.memory_index.insert(key, value).await; } - pub(crate) async fn get_reader(&self, file_path: &str) -> ObjectStoreResult> { + async fn get_reader(&self, file_path: &str) -> object_store::Result> { if self.local_store.is_exist(file_path).await? { Ok(Some(self.local_store.reader(file_path).await?)) } else { @@ -126,7 +126,7 @@ impl FileCache { warn!("Failed to get file for key {:?}, err: {}", key, e); } } - _ => {} + Ok(None) => {} } // We removes the file from the index.