Fix layout cache on nightly

This commit is contained in:
Florian Dehau 2016-11-06 21:42:14 +01:00
parent b19c014889
commit 6fb044950a

View file

@ -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()
}