diff --git a/crates/ruma-state-res/src/lib.rs b/crates/ruma-state-res/src/lib.rs index 1e7b9a41..e59ecf4b 100644 --- a/crates/ruma-state-res/src/lib.rs +++ b/crates/ruma-state-res/src/lib.rs @@ -79,7 +79,7 @@ where debug!("{:?}", conflicting); // The set of auth events that are not common across server forks - let mut auth_diff = get_auth_chain_diff(auth_chain_sets)?; + let mut auth_diff = get_auth_chain_diff(auth_chain_sets); // Add the auth_diff to conflicting now we have a full set of conflicting events auth_diff.extend(conflicting.values().cloned().flatten().flatten()); @@ -195,16 +195,16 @@ pub fn separate( } /// Returns a Vec of deduped EventIds that appear in some chains but not others. -pub fn get_auth_chain_diff(auth_chain_sets: Vec>) -> Result> { +pub fn get_auth_chain_diff(auth_chain_sets: Vec>) -> HashSet { if let Some(first) = auth_chain_sets.first().cloned() { let common = auth_chain_sets .iter() .skip(1) .fold(first, |a, b| a.intersection(b).cloned().collect::>()); - Ok(auth_chain_sets.into_iter().flatten().filter(|id| !common.contains(id)).collect()) + auth_chain_sets.into_iter().flatten().filter(|id| !common.contains(id)).collect() } else { - Ok(HashSet::new()) + HashSet::new() } }