fix: restored accidentally deleted impls

This commit is contained in:
zaaarf 2024-03-09 19:55:45 +01:00
parent fa42d37e2f
commit f2d18a06ad
No known key found for this signature in database
GPG key ID: 102E445F4C3F829B

View file

@ -7,6 +7,24 @@ pub mod common {
Identity { id: id.to_string() }
}
}
impl From<&uuid::Uuid> for Identity {
fn from(id: &uuid::Uuid) -> Self {
Identity { id: id.to_string() }
}
}
impl From<Identity> for uuid::Uuid {
fn from(value: Identity) -> Self {
uuid::Uuid::parse_str(&value.id).expect("invalid uuid in identity")
}
}
impl From<&Identity> for uuid::Uuid {
fn from(value: &Identity) -> Self {
uuid::Uuid::parse_str(&value.id).expect("invalid uuid in identity")
}
}
}
pub mod files {