2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-11-20 11:21:14 +00:00

Use async fn in trait for Store

This commit is contained in:
asonix 2024-01-15 15:51:20 -05:00
parent 2090bfc99f
commit f6087d65be
3 changed files with 0 additions and 6 deletions

View file

@ -83,7 +83,6 @@ impl From<crate::store::object_store::ObjectError> 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<str>) -> Result<(), StoreError>;
}
#[async_trait::async_trait(?Send)]
impl<T> Store for actix_web::web::Data<T>
where
T: Store,
@ -225,7 +223,6 @@ where
}
}
#[async_trait::async_trait(?Send)]
impl<T> Store for Arc<T>
where
T: Store,
@ -297,7 +294,6 @@ where
}
}
#[async_trait::async_trait(?Send)]
impl<'a, T> Store for &'a T
where
T: Store,

View file

@ -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> {

View file

@ -200,7 +200,6 @@ async fn status_error(response: Response, object: Option<Arc<str>>) -> 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