You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tui-rs/src/util.rs

11 lines
206 B
Rust

use std::hash::{Hash, SipHasher, Hasher};
use layout::Rect;
pub fn hash<T: Hash>(t: &T, area: &Rect) -> u64 {
let mut s = SipHasher::new();
t.hash(&mut s);
area.hash(&mut s);
s.finish()
}