From 12b5af907a69fe27a036726714648e66c44713d7 Mon Sep 17 00:00:00 2001 From: Morris Tai Date: Fri, 3 May 2024 01:22:34 -0300 Subject: [PATCH 1/2] chore: align naming for AccessorDyn --- core/src/raw/accessor.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/raw/accessor.rs b/core/src/raw/accessor.rs index 9c02f08526b..a8788ccc335 100644 --- a/core/src/raw/accessor.rs +++ b/core/src/raw/accessor.rs @@ -397,7 +397,7 @@ pub trait Access: Send + Sync + Debug + Unpin + 'static { /// `AccessorDyn` is the dyn version of [`Access`] make it possible to use as /// `Box`. -pub trait AccessorDyn: Send + Sync + Debug + Unpin { +pub trait AccessDyn: Send + Sync + Debug + Unpin { /// Dyn version of [`Accessor::info`] fn info_dyn(&self) -> AccessorInfo; /// Dyn version of [`Accessor::create_dir`] @@ -473,7 +473,7 @@ pub trait AccessorDyn: Send + Sync + Debug + Unpin { fn blocking_rename_dyn(&self, from: &str, to: &str, args: OpRename) -> Result; } -impl AccessorDyn for A +impl AccessDyn for A where A: Access< Reader = oio::Reader, @@ -599,7 +599,7 @@ where } } -impl Access for dyn AccessorDyn { +impl Access for dyn AccessDyn { type Reader = oio::Reader; type BlockingReader = oio::BlockingReader; type Writer = oio::Writer; @@ -829,7 +829,7 @@ impl Access for Arc { } /// Accessor is the type erased accessor with `Arc`. -pub type Accessor = Arc; +pub type Accessor = Arc; /// Metadata for accessor, users can use this metadata to get information of underlying backend. #[derive(Clone, Debug, Default)] From bbffeb8be701d4cb50a923a60787e6990914da31 Mon Sep 17 00:00:00 2001 From: Morris Tai Date: Fri, 3 May 2024 01:46:50 -0300 Subject: [PATCH 2/2] chore: align naming for AccessorDyn --- core/src/raw/accessor.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/raw/accessor.rs b/core/src/raw/accessor.rs index a8788ccc335..d2fed8f1f07 100644 --- a/core/src/raw/accessor.rs +++ b/core/src/raw/accessor.rs @@ -395,8 +395,8 @@ pub trait Access: Send + Sync + Debug + Unpin + 'static { } } -/// `AccessorDyn` is the dyn version of [`Access`] make it possible to use as -/// `Box`. +/// `AccessDyn` is the dyn version of [`Access`] make it possible to use as +/// `Box`. pub trait AccessDyn: Send + Sync + Debug + Unpin { /// Dyn version of [`Accessor::info`] fn info_dyn(&self) -> AccessorInfo;