stores: Switch from dyn to impl and implement Sized

This commit is contained in:
Lennart
2025-01-15 17:21:01 +01:00
parent 751c2d1ce7
commit 6d78a3936f
28 changed files with 55 additions and 72 deletions

View File

@@ -8,11 +8,7 @@ use rustical_store::{AddressbookStore, CalendarStore, SubscriptionStore};
use std::sync::Arc;
use tracing_actix_web::TracingLogger;
pub fn make_app<
AS: AddressbookStore + ?Sized,
CS: CalendarStore + ?Sized,
S: SubscriptionStore + ?Sized,
>(
pub fn make_app<AS: AddressbookStore, CS: CalendarStore, S: SubscriptionStore>(
addr_store: Arc<AS>,
cal_store: Arc<CS>,
subscription_store: Arc<S>,

View File

@@ -46,9 +46,9 @@ async fn get_data_stores(
migrate: bool,
config: &DataStoreConfig,
) -> Result<(
Arc<dyn AddressbookStore>,
Arc<dyn CalendarStore>,
Arc<dyn SubscriptionStore>,
Arc<impl AddressbookStore>,
Arc<impl CalendarStore>,
Arc<impl SubscriptionStore>,
Receiver<CollectionOperation>,
)> {
Ok(match &config {