Make it easier to convert strings to Id (#2350)
This commit is contained in:
parent
502e1aa229
commit
d2f70cdcd1
1 changed files with 7 additions and 0 deletions
|
@ -85,6 +85,13 @@ impl From<&'static str> for Id {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<String> for Id {
|
||||||
|
#[inline]
|
||||||
|
fn from(string: String) -> Self {
|
||||||
|
Self::new(string)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// Idea taken from the `nohash_hasher` crate.
|
// Idea taken from the `nohash_hasher` crate.
|
||||||
|
|
Loading…
Reference in a new issue