trace keys as well

This commit is contained in:
Rohan Prinja 2014-09-28 09:44:43 +05:30
parent a2220f1ea4
commit e50e704f5a

View file

@ -211,10 +211,11 @@ impl<T: JSTraceable> JSTraceable for Option<T> {
}
}
impl<K: Eq+Hash, V: JSTraceable> JSTraceable for HashMap<K, V> {
impl<K: Eq+Hash+JSTraceable, V: JSTraceable> JSTraceable for HashMap<K, V> {
#[inline]
fn trace(&self, trc: *mut JSTracer) {
for e in self.iter() {
e.val0().trace(trc);
e.val1().trace(trc);
}
}