tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 5544Rust 88Markdown 11TOML 91926 Definiciones

Implement `Hash` for `NodeId`

9d3f2ba065ac285f02c253189e8128961c8267aa · por Nico Burns · (hace 2 años) · padre 17235ffa2 · ver el árbol en este commit

Delta semántico

Ninguna definición cambió: el cambio es de texto, documentación o datos.

1 archivos · +1 −1

diff --git a/src/tree/node.rs b/src/tree/node.rs
index 0eea96c3b..78e785e97 100644
--- a/src/tree/node.rs
+++ b/src/tree/node.rs
@@ -12,7 +12,7 @@ use slotmap::{DefaultKey, Key, KeyData};
 ///
 /// Internally it is a wrapper around a u64 and a `NodeId` can be converted to and from
 /// and u64 if needed.
-#[derive(Copy, Clone, Debug, PartialEq, Eq)]
+#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
 pub struct NodeId(u64);
 impl NodeId {
     /// Create a new NodeId from a u64 value