fix damage

This commit is contained in:
Robin Appelman 2023-03-16 22:46:52 +01:00
commit 838c3a0dd9
4 changed files with 17 additions and 3 deletions

View file

@ -76,6 +76,12 @@ pub enum RawSubject<'a> {
World,
}
impl Default for RawSubject<'static> {
fn default() -> Self {
RawSubject::System("unknown")
}
}
impl<'a> RawSubject<'a> {
pub fn id(&self) -> Result<SubjectId, SubjectError> {
self.try_into()