mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2025-12-15 03:38:56 -05:00
refactor dyn KvTree out of services
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
57acc4f655
commit
cb48e25783
69 changed files with 594 additions and 647 deletions
|
|
@ -1,18 +1,17 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use database::KvTree;
|
||||
use conduit::{utils, Error, Result};
|
||||
use database::{Database, Map};
|
||||
use ruma::api::appservice::Registration;
|
||||
|
||||
use crate::{utils, Error, KeyValueDatabase, Result};
|
||||
|
||||
pub struct Data {
|
||||
id_appserviceregistrations: Arc<dyn KvTree>,
|
||||
id_appserviceregistrations: Arc<Map>,
|
||||
}
|
||||
|
||||
impl Data {
|
||||
pub(super) fn new(db: &Arc<KeyValueDatabase>) -> Self {
|
||||
pub(super) fn new(db: &Arc<Database>) -> Self {
|
||||
Self {
|
||||
id_appserviceregistrations: db.id_appserviceregistrations.clone(),
|
||||
id_appserviceregistrations: db["id_appserviceregistrations"].clone(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue