refactor: remove storage api facade (#3490)

This commit is contained in:
安正超
2026-06-16 07:46:32 +08:00
committed by GitHub
parent c26593fa7a
commit 0baf90ee88
9 changed files with 60 additions and 116 deletions
@@ -12,12 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use rustfs_ecstore::{
disk::DiskStore,
error::Error,
store::ECStore,
store_api::{NamespaceLocking, StorageAPI},
};
use rustfs_ecstore::{disk::DiskStore, error::Error, store::ECStore, store_api::NamespaceLocking};
use rustfs_storage_api::StorageAdminApi;
fn storage_admin_api_type_name<T>() -> &'static str
@@ -32,9 +27,9 @@ where
std::any::type_name::<T>()
}
fn storage_api_with_namespace_locking_type_name<T>() -> &'static str
fn namespace_locking_type_name<T>() -> &'static str
where
T: StorageAPI + NamespaceLocking,
T: NamespaceLocking,
{
std::any::type_name::<T>()
}
@@ -45,6 +40,6 @@ fn ecstore_implements_storage_admin_api_contract() {
}
#[test]
fn ecstore_implements_storage_api_and_namespace_locking_contracts() {
assert!(storage_api_with_namespace_locking_type_name::<ECStore>().ends_with("::ECStore"));
fn ecstore_implements_namespace_locking_contract() {
assert!(namespace_locking_type_name::<ECStore>().ends_with("::ECStore"));
}