mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 23:31:24 +01:00
MSC3575: remove useless Ok-wrapping
This commit is contained in:
parent
e75fe7b75a
commit
3bbee92db4
1 changed files with 7 additions and 9 deletions
|
|
@ -455,15 +455,13 @@ pub(crate) async fn sync_events_v4_route(
|
|||
|
||||
let prev_batch = timeline_pdus
|
||||
.first()
|
||||
.map_or(Ok::<_, Error>(None), |(pdu_count, _)| {
|
||||
Ok(Some(match pdu_count {
|
||||
PduCount::Backfilled(_) => {
|
||||
error!("Timeline in backfill state?!");
|
||||
"0".to_owned()
|
||||
}
|
||||
PduCount::Normal(c) => c.to_string(),
|
||||
}))
|
||||
})?
|
||||
.map(|(pdu_count, _)| match pdu_count {
|
||||
PduCount::Backfilled(_) => {
|
||||
error!("Timeline in backfill state?!");
|
||||
"0".to_owned()
|
||||
}
|
||||
PduCount::Normal(c) => c.to_string(),
|
||||
})
|
||||
.or_else(|| (roomsince != &0).then(|| roomsince.to_string()));
|
||||
|
||||
let room_events: Vec<_> = timeline_pdus
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue