mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Get rid of a bunch of explicit derefs
This commit is contained in:
parent
ca56ebbb09
commit
722aa86c89
49 changed files with 340 additions and 360 deletions
|
@ -760,7 +760,7 @@ pub fn native_from_handleobject<T>(obj: HandleObject) -> Result<Root<T>, ()>
|
|||
|
||||
impl<T: Reflectable> ToJSValConvertible for Root<T> {
|
||||
fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue) {
|
||||
self.r().reflector().to_jsval(cx, rval);
|
||||
self.reflector().to_jsval(cx, rval);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -491,7 +491,7 @@ impl RootCollection {
|
|||
debug_assert!(task_state::get().is_script());
|
||||
unsafe {
|
||||
let mut roots = &mut *self.roots.get();
|
||||
let old_reflector = &*rooted.r().reflector();
|
||||
let old_reflector = &*rooted.reflector();
|
||||
match roots.iter().rposition(|r| *r == old_reflector) {
|
||||
Some(idx) => {
|
||||
roots.remove(idx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue