use builtin hash functions instead of rolling my own

This commit is contained in:
Alessandro Mauri 2024-11-21 00:50:11 +01:00
parent bb1745a05d
commit 9a785e0f06
5 changed files with 5 additions and 21 deletions

View file

@ -5,7 +5,7 @@ import std::io;
// draw a button, return the events on that button
fn ElemEvents! Ctx.button(&ctx, String label, Rect size)
{
Id id = hash(label);
Id id = label.hash();
Elem *parent = ctx.get_parent()!;
Elem *c_elem = ctx.get_elem(id)!;