chore: do not namespace as proto

This commit is contained in:
zaaarf 2024-03-09 19:27:29 +01:00
parent 4347dfa9d7
commit 460ef34712
No known key found for this signature in database
GPG key ID: 102E445F4C3F829B

View file

@ -1,5 +1,4 @@
#[allow(non_snake_case)]
pub mod proto {
pub mod common {
tonic::include_proto!("common");
@ -8,24 +7,6 @@ pub mod proto {
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 {
@ -64,4 +45,3 @@ pub mod proto {
pub mod auth {
tonic::include_proto!("auth");
}
}