mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Use boxed slice instead of vec for FuntionTimerCallback
This commit is contained in:
parent
eec51cdd57
commit
fa678992ff
2 changed files with 10 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue