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
No known key found for this signature in database
GPG key ID: E7819C3ED4D1F82E
77 changed files with 598 additions and 434 deletions

View file

@ -1,10 +1,10 @@
use std::mem::size_of;
use std::{mem::size_of, sync::Arc};
use ruma::RoomId;
use crate::{service, database::KeyValueDatabase, utils, Result, services};
impl service::rooms::search::Data for KeyValueDatabase {
impl service::rooms::search::Data for Arc<KeyValueDatabase> {
fn index_pdu<'a>(&self, shortroomid: u64, pdu_id: &[u8], message_body: String) -> Result<()> {
let mut batch = message_body
.split_terminator(|c: char| !c.is_alphanumeric())