mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 13:50:04 -04:00
Make it easier to convert strings to Id (#2350)
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user