fix: some compile time errors

Only 174 errors left!
This commit is contained in:
Timo Kösters 2022-09-06 23:15:09 +02:00 committed by Nyaaori
parent 82e7f57b38
commit 057f8364cc
No known key found for this signature in database
GPG key ID: E7819C3ED4D1F82E
118 changed files with 2139 additions and 2433 deletions

View file

@ -1,3 +1,9 @@
pub mod presence;
pub mod read_receipt;
pub mod typing;
pub struct Service<D> {
presence: presence::Service<D>,
read_receipt: read_receipt::Service<D>,
typing: typing::Service<D>,
}

View file

@ -1,3 +1,7 @@
use std::collections::HashMap;
use ruma::{UserId, RoomId, events::presence::PresenceEvent};
pub trait Data {
/// Adds a presence event which will be saved until a new event replaces it.
///

View file

@ -1,5 +1,8 @@
mod data;
use std::collections::HashMap;
pub use data::Data;
use ruma::{RoomId, UserId, events::presence::PresenceEvent};
use crate::service::*;
@ -108,7 +111,7 @@ impl Service<_> {
}*/
/// Returns the most recent presence updates that happened after the event with id `since`.
#[tracing::instrument(skip(self, since, _rooms, _globals))]
#[tracing::instrument(skip(self, since, room_id))]
pub fn presence_since(
&self,
room_id: &RoomId,

View file

@ -1,3 +1,5 @@
use ruma::{RoomId, events::receipt::ReceiptEvent, UserId, serde::Raw};
pub trait Data {
/// Replaces the previous read receipt.
fn readreceipt_update(

View file

@ -1,7 +1,6 @@
mod data;
pub use data::Data;
use crate::service::*;
use ruma::{RoomId, UserId, events::receipt::ReceiptEvent, serde::Raw};
pub struct Service<D: Data> {
db: D,
@ -15,7 +14,7 @@ impl Service<_> {
room_id: &RoomId,
event: ReceiptEvent,
) -> Result<()> {
self.db.readreceipt_update(user_id, room_id, event);
self.db.readreceipt_update(user_id, room_id, event)
}
/// Returns an iterator over the most recent read_receipts in a room that happened after the event with id `since`.
@ -35,7 +34,7 @@ impl Service<_> {
}
/// Sets a private read marker at `count`.
#[tracing::instrument(skip(self, globals))]
#[tracing::instrument(skip(self))]
pub fn private_read_set(&self, room_id: &RoomId, user_id: &UserId, count: u64) -> Result<()> {
self.db.private_read_set(room_id, user_id, count)
}

View file

@ -1,3 +1,7 @@
use std::collections::HashSet;
use ruma::{UserId, RoomId};
pub trait Data {
/// Sets a user as typing until the timeout timestamp is reached or roomtyping_remove is
/// called.

View file

@ -1,5 +1,6 @@
mod data;
pub use data::Data;
use ruma::{UserId, RoomId};
use crate::service::*;
@ -66,7 +67,6 @@ impl Service<_> {
*/
/// Returns the count of the last typing update in this room.
#[tracing::instrument(skip(self, globals))]
pub fn last_typing_update(&self, room_id: &RoomId) -> Result<u64> {
self.db.last_typing_update(room_id)
}