Store calculated room ID on top-level

Rather than validating and then re-calcualting it every time, let's just
store it on the top-level.
This commit is contained in:
Erik Johnston
2026-05-29 14:34:36 +01:00
parent 6fc928707b
commit fa77d4cb52
6 changed files with 60 additions and 35 deletions
+8
View File
@@ -64,6 +64,14 @@ impl<T> AllowMissing<T> {
AllowMissing::Absent => None,
}
}
/// Converts to `Option<&T>`.
pub fn as_ref_opt(&self) -> Option<&T> {
match self {
AllowMissing::Some(inner) => Some(inner),
AllowMissing::Absent => None,
}
}
}
/// A module that provides the serialization and deserialization logic for