Remove useless as_str on ID

This commit is contained in:
Samuel Hurel 2020-05-10 15:58:56 +02:00
parent c810764e7e
commit 34f286b2d9
2 changed files with 1 additions and 8 deletions

View File

@ -33,7 +33,7 @@ pub trait Type {
/// Returns a `GlobalID` that is unique among all types.
fn global_id(id: ID) -> ID {
base64::encode(format!("{}:{}", Self::type_name(), id.as_str())).into()
base64::encode(format!("{}:{}", Self::type_name(), *id)).into()
}
/// Parse `GlobalID`.

View File

@ -12,13 +12,6 @@ use uuid::Uuid;
#[derive(Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug)]
pub struct ID(String);
impl ID {
/// Gives a string representation of the ID
pub fn as_str(&self) -> &str {
&self.0
}
}
impl Deref for ID {
type Target = String;