mirror of
https://github.com/ratatui/ratatui.git
synced 2025-09-30 22:41:44 +00:00
Fix layout cache on nightly
This commit is contained in:
parent
b19c014889
commit
6fb044950a
12
src/util.rs
12
src/util.rs
@ -1,12 +0,0 @@
|
||||
use std::collections::hash_map::RandomState;
|
||||
use std::hash::{Hash, Hasher, BuildHasher};
|
||||
|
||||
use layout::Rect;
|
||||
|
||||
pub fn hash<T: Hash>(t: &T, area: &Rect) -> u64 {
|
||||
let state = RandomState::new();
|
||||
let mut hasher = state.build_hasher();
|
||||
t.hash(&mut hasher);
|
||||
area.hash(&mut hasher);
|
||||
hasher.finish()
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user