1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

Make it easier to convert strings to Id (#2350)

This commit is contained in:
Erlend Walstad
2022-11-27 13:15:18 +01:00
committed by GitHub
parent 502e1aa229
commit d2f70cdcd1

View File

@@ -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.