Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

gpui: Make create ElementId more easier from u64 (#64702)

Fline9ddcdaf9829
diff --git a/crates/gpui/src/window.rs b/crates/gpui/src/window.rs
index ae0cca86b8f..645f9dbc51a 100644
--- a/crates/gpui/src/window.rs
+++ b/crates/gpui/src/window.rs
@@ -7437,6 +7437,12 @@ impl TryInto<SharedString> for ElementId {
}
}
+impl From<u64> for ElementId {
+ fn from(id: u64) -> Self {
+ ElementId::Integer(id)
+ }
+}
+
impl From<usize> for ElementId {
fn from(id: usize) -> Self {
ElementId::Integer(id as u64)