From f6087d65be4a94a944404733d38c641f81a8afbe Mon Sep 17 00:00:00 2001 From: asonix Date: Mon, 15 Jan 2024 15:51:20 -0500 Subject: [PATCH] Use async fn in trait for Store --- src/store.rs | 4 ---- src/store/file_store.rs | 1 - src/store/object_store.rs | 1 - 3 files changed, 6 deletions(-) diff --git a/src/store.rs b/src/store.rs index b9e435f..2006713 100644 --- a/src/store.rs +++ b/src/store.rs @@ -83,7 +83,6 @@ impl From for StoreError { } } -#[async_trait::async_trait(?Send)] pub(crate) trait Store: Clone + Debug { async fn health_check(&self) -> Result<(), StoreError>; @@ -153,7 +152,6 @@ pub(crate) trait Store: Clone + Debug { async fn remove(&self, identifier: &Arc) -> Result<(), StoreError>; } -#[async_trait::async_trait(?Send)] impl Store for actix_web::web::Data where T: Store, @@ -225,7 +223,6 @@ where } } -#[async_trait::async_trait(?Send)] impl Store for Arc where T: Store, @@ -297,7 +294,6 @@ where } } -#[async_trait::async_trait(?Send)] impl<'a, T> Store for &'a T where T: Store, diff --git a/src/store/file_store.rs b/src/store/file_store.rs index 378473e..1883706 100644 --- a/src/store/file_store.rs +++ b/src/store/file_store.rs @@ -55,7 +55,6 @@ pub(crate) struct FileStore { repo: ArcRepo, } -#[async_trait::async_trait(?Send)] impl Store for FileStore { #[tracing::instrument(level = "debug", skip(self))] async fn health_check(&self) -> Result<(), StoreError> { diff --git a/src/store/object_store.rs b/src/store/object_store.rs index dd5b124..08a8aac 100644 --- a/src/store/object_store.rs +++ b/src/store/object_store.rs @@ -200,7 +200,6 @@ async fn status_error(response: Response, object: Option>) -> StoreErro ObjectError::Status(status, body, object).into() } -#[async_trait::async_trait(?Send)] impl Store for ObjectStore { async fn health_check(&self) -> Result<(), StoreError> { let response = self