mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 13:16:56 +00:00
fix: Address review comments
This commit is contained in:
1 file changed
+4
-5
@@ -224,8 +224,7 @@ impl super::Service {
|
|||||||
.prev_events()
|
.prev_events()
|
||||||
.map(ToOwned::to_owned)
|
.map(ToOwned::to_owned)
|
||||||
.stream()
|
.stream()
|
||||||
.broad_filter_map(|prev_id| async move {
|
.broad_filter_map(|prev_id| async {
|
||||||
let room_id = incoming_pdu.room_id_or_hash();
|
|
||||||
let (referenced, is_outlier, is_soft_failed, is_rejected) = tokio::join!(
|
let (referenced, is_outlier, is_soft_failed, is_rejected) = tokio::join!(
|
||||||
self.services
|
self.services
|
||||||
.pdu_metadata
|
.pdu_metadata
|
||||||
@@ -248,11 +247,11 @@ impl super::Service {
|
|||||||
incoming_pdu.prev_events().count(),
|
incoming_pdu.prev_events().count(),
|
||||||
start.elapsed(),
|
start.elapsed(),
|
||||||
);
|
);
|
||||||
debug_assert!(!new_extremities.is_empty(), "resolved extremities cannot be empty");
|
|
||||||
if new_extremities.is_empty() {
|
if new_extremities.is_empty() {
|
||||||
return Err!("Resolved extremities cannot be empty");
|
Err!("Resolved extremity set was empty after processing incoming event")
|
||||||
|
} else {
|
||||||
|
Ok(new_extremities.into_iter().collect())
|
||||||
}
|
}
|
||||||
Ok(new_extremities.into_iter().collect())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Derives a new room state by adding the incoming PDU to the state before
|
/// Derives a new room state by adding the incoming PDU to the state before
|
||||||
|
|||||||
Reference in new issue
Block a user