mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
style: Reformat and whatnot
This commit is contained in:
@@ -17,12 +17,8 @@ pub const STABLE_ROOM_VERSIONS: &[RoomVersionId] = &[
|
||||
];
|
||||
|
||||
/// Experimental, partially supported room versions
|
||||
pub const UNSTABLE_ROOM_VERSIONS: &[RoomVersionId] = &[
|
||||
RoomVersionId::V3,
|
||||
RoomVersionId::V4,
|
||||
RoomVersionId::V5,
|
||||
RoomVersionId::V12,
|
||||
];
|
||||
pub const UNSTABLE_ROOM_VERSIONS: &[RoomVersionId] =
|
||||
&[RoomVersionId::V3, RoomVersionId::V4, RoomVersionId::V5, RoomVersionId::V12];
|
||||
|
||||
type RoomVersion = (RoomVersionId, RoomVersionStability);
|
||||
|
||||
|
||||
@@ -289,11 +289,11 @@ where
|
||||
let mut path: Vec<OwnedEventId> = Vec::new();
|
||||
let mut seen: HashSet<OwnedEventId> = HashSet::new();
|
||||
let next_event = |stack: &mut Vec<Vec<_>>, path: &mut Vec<_>| {
|
||||
while stack.last().is_some_and(|s| s.is_empty()) {
|
||||
while stack.last().is_some_and(std::vec::Vec::is_empty) {
|
||||
stack.pop();
|
||||
path.pop();
|
||||
}
|
||||
stack.last_mut().and_then(|s| s.pop())
|
||||
stack.last_mut().and_then(std::vec::Vec::pop)
|
||||
};
|
||||
while let Some(event_id) = next_event(&mut stack, &mut path) {
|
||||
path.push(event_id.clone());
|
||||
|
||||
Reference in New Issue
Block a user