messing around with arcs

This commit is contained in:
Timo Kösters
2022-10-05 15:33:57 +02:00
committed by Nyaaori
parent face766e0f
commit cff52d7ebb
77 changed files with 598 additions and 434 deletions

View File

@@ -1,8 +1,10 @@
use std::sync::Arc;
use ruma::RoomId;
use crate::{service, database::KeyValueDatabase, Result, services};
impl service::rooms::metadata::Data for KeyValueDatabase {
impl service::rooms::metadata::Data for Arc<KeyValueDatabase> {
fn exists(&self, room_id: &RoomId) -> Result<bool> {
let prefix = match services().rooms.short.get_shortroomid(room_id)? {
Some(b) => b.to_be_bytes().to_vec(),