mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
enable same_name_method lint
This commit is contained in:
parent
d144db8688
commit
cc5977b4e4
6 changed files with 14 additions and 17 deletions
|
|
@ -121,8 +121,8 @@ pub(crate) async fn get_message_events_route(
|
|||
let from = match body.from.clone() {
|
||||
Some(from) => PduCount::try_from_string(&from)?,
|
||||
None => match body.dir {
|
||||
ruma::api::Direction::Forward => PduCount::min(),
|
||||
ruma::api::Direction::Backward => PduCount::max(),
|
||||
ruma::api::Direction::Forward => PduCount::MIN,
|
||||
ruma::api::Direction::Backward => PduCount::MAX,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ pub(crate) async fn get_relating_events_with_rel_type_and_event_type_route(
|
|||
Some(from) => PduCount::try_from_string(&from)?,
|
||||
None => match ruma::api::Direction::Backward {
|
||||
// TODO: fix ruma so `body.dir` exists
|
||||
ruma::api::Direction::Forward => PduCount::min(),
|
||||
ruma::api::Direction::Backward => PduCount::max(),
|
||||
ruma::api::Direction::Forward => PduCount::MIN,
|
||||
ruma::api::Direction::Backward => PduCount::MAX,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -69,8 +69,8 @@ pub(crate) async fn get_relating_events_with_rel_type_route(
|
|||
Some(from) => PduCount::try_from_string(&from)?,
|
||||
None => match ruma::api::Direction::Backward {
|
||||
// TODO: fix ruma so `body.dir` exists
|
||||
ruma::api::Direction::Forward => PduCount::min(),
|
||||
ruma::api::Direction::Backward => PduCount::max(),
|
||||
ruma::api::Direction::Forward => PduCount::MIN,
|
||||
ruma::api::Direction::Backward => PduCount::MAX,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -118,8 +118,8 @@ pub(crate) async fn get_relating_events_route(
|
|||
Some(from) => PduCount::try_from_string(&from)?,
|
||||
None => match ruma::api::Direction::Backward {
|
||||
// TODO: fix ruma so `body.dir` exists
|
||||
ruma::api::Direction::Forward => PduCount::min(),
|
||||
ruma::api::Direction::Backward => PduCount::max(),
|
||||
ruma::api::Direction::Forward => PduCount::MIN,
|
||||
ruma::api::Direction::Backward => PduCount::MAX,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1120,7 +1120,7 @@ fn load_timeline(
|
|||
let mut non_timeline_pdus = services()
|
||||
.rooms
|
||||
.timeline
|
||||
.pdus_until(sender_user, room_id, PduCount::max())?
|
||||
.pdus_until(sender_user, room_id, PduCount::MAX)?
|
||||
.filter_map(|r| {
|
||||
// Filter out buggy events
|
||||
if r.is_err() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue