fix all the warnings!!!! (0 clippy and rustc warnings now)

too many changes to list, codebase significantly better than it was a few weeks ago though

Signed-off-by: strawberry <june@girlboss.ceo>
This commit is contained in:
strawberry 2023-11-29 21:36:02 -05:00
parent 20b686cac5
commit 87d6a17f0a
27 changed files with 162 additions and 139 deletions

View file

@ -5,7 +5,11 @@ use ruma::{
};
use tracing::error;
use crate::{database::KeyValueDatabase, service, services, utils, Error, PduEvent, Result};
use crate::{
database::KeyValueDatabase,
service::{self, rooms::timeline::data::PduData},
services, utils, Error, PduEvent, Result,
};
use service::rooms::timeline::PduCount;
@ -228,7 +232,7 @@ impl service::rooms::timeline::Data for KeyValueDatabase {
user_id: &UserId,
room_id: &RoomId,
until: PduCount,
) -> Result<Box<dyn Iterator<Item = Result<(PduCount, PduEvent)>> + 'a>> {
) -> PduData<'a> {
let (prefix, current) = count_to_id(room_id, until, 1, true)?;
let user_id = user_id.to_owned();
@ -250,12 +254,7 @@ impl service::rooms::timeline::Data for KeyValueDatabase {
))
}
fn pdus_after<'a>(
&'a self,
user_id: &UserId,
room_id: &RoomId,
from: PduCount,
) -> Result<Box<dyn Iterator<Item = Result<(PduCount, PduEvent)>> + 'a>> {
fn pdus_after<'a>(&'a self, user_id: &UserId, room_id: &RoomId, from: PduCount) -> PduData<'a> {
let (prefix, current) = count_to_id(room_id, from, 1, false)?;
let user_id = user_id.to_owned();