Merge pull request #3508 from wenderen/JSTraceable.key

trace keys as well

Reviewed-by: Manishearth
This commit is contained in:
bors-servo 2014-09-27 23:21:28 -06:00
commit 42205675b3

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] #[inline]
fn trace(&self, trc: *mut JSTracer) { fn trace(&self, trc: *mut JSTracer) {
for e in self.iter() { for e in self.iter() {
e.val0().trace(trc);
e.val1().trace(trc); e.val1().trace(trc);
} }
} }