refactor dyn KvTree out of services

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-06-28 22:51:39 +00:00
parent 57acc4f655
commit cb48e25783
69 changed files with 594 additions and 647 deletions

View file

@ -1,11 +1,10 @@
use conduit::Server;
mod data;
use std::{collections::BTreeMap, sync::Arc};
use conduit::Result;
use conduit::{Result, Server};
use data::Data;
use database::KeyValueDatabase;
use database::Database;
use ruma::{
api::client::backup::{BackupAlgorithm, KeyBackupData, RoomKeyBackup},
serde::Raw,
@ -13,11 +12,11 @@ use ruma::{
};
pub struct Service {
pub(super) db: Data,
db: Data,
}
impl Service {
pub fn build(_server: &Arc<Server>, db: &Arc<KeyValueDatabase>) -> Result<Self> {
pub fn build(_server: &Arc<Server>, db: &Arc<Database>) -> Result<Self> {
Ok(Self {
db: Data::new(db),
})