fix clippy::ref_option

fix needless borrow

fix clippy::nonminimal_bool
This commit is contained in:
Jason Volk 2024-10-27 00:30:30 +00:00
parent 5e6dbaa27f
commit 9787dfe77c
11 changed files with 24 additions and 30 deletions

View file

@ -560,7 +560,7 @@ pub(crate) async fn sync_events_v4_route(
for (_, pdu) in timeline_pdus {
let ts = MilliSecondsSinceUnixEpoch(pdu.origin_server_ts);
if DEFAULT_BUMP_TYPES.contains(pdu.event_type()) && !timestamp.is_some_and(|time| time > ts) {
if DEFAULT_BUMP_TYPES.contains(pdu.event_type()) && timestamp.is_none_or(|time| time <= ts) {
timestamp = Some(ts);
}
}