tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 499HTML 245JavaScript 8Markdown 71218 Sutichaykuna

Implement `Hash` for `NodeId`

9d3f2ba065ac285f02c253189e8128961c8267aa · ruwaq Nico Burns · (2 wata ñawpaq) · tayta 17235ffa2 · kay commitpi sach'ata qhaway

Semántico sayk'uy

Mana ima sutichaypas t'ikrakurqanchu: qillqalla, yachachiylla utaq willaylla t'ikrakurqan.

1 qillqakuna · +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