mirror of
https://github.com/hexedtech/codemp-proto.git
synced 2024-11-21 23:14:52 +01:00
fix: restored accidentally deleted impls
This commit is contained in:
parent
fa42d37e2f
commit
f2d18a06ad
1 changed files with 18 additions and 0 deletions
18
src/lib.rs
18
src/lib.rs
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue