mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2025-12-17 12:51:26 -05:00
messing with trait objects
This commit is contained in:
parent
8708cd3b63
commit
face766e0f
61 changed files with 623 additions and 544 deletions
|
|
@ -1,10 +1,10 @@
|
|||
use ruma::RoomId;
|
||||
|
||||
use crate::{service, database::KeyValueDatabase, Result};
|
||||
use crate::{service, database::KeyValueDatabase, Result, services};
|
||||
|
||||
impl service::rooms::metadata::Data for KeyValueDatabase {
|
||||
fn exists(&self, room_id: &RoomId) -> Result<bool> {
|
||||
let prefix = match self.get_shortroomid(room_id)? {
|
||||
let prefix = match services().rooms.short.get_shortroomid(room_id)? {
|
||||
Some(b) => b.to_be_bytes().to_vec(),
|
||||
None => return Ok(false),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue