Use boxed slice instead of vec for FuntionTimerCallback

This commit is contained in:
Sadman Kazi 2017-07-11 13:48:52 -07:00
parent eec51cdd57
commit fa678992ff
2 changed files with 10 additions and 2 deletions

View file

@ -177,6 +177,14 @@ unsafe impl<T: JSTraceable + ?Sized> JSTraceable for Box<T> {
}
}
unsafe impl<T: JSTraceable> JSTraceable for [T] {
unsafe fn trace(&self, trc: *mut JSTracer) {
for e in self.iter() {
e.trace(trc);
}
}
}
unsafe impl<T: JSTraceable + Copy> JSTraceable for Cell<T> {
unsafe fn trace(&self, trc: *mut JSTracer) {
self.get().trace(trc)