mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
clippy: Fix needless borrow warnings (#31813)
This commit is contained in:
parent
694e86ecff
commit
3e63f8d6ee
42 changed files with 151 additions and 157 deletions
|
@ -54,7 +54,7 @@ impl History {
|
|||
state.set(NullValue());
|
||||
History {
|
||||
reflector_: Reflector::new(),
|
||||
window: Dom::from_ref(&window),
|
||||
window: Dom::from_ref(window),
|
||||
state,
|
||||
state_id: Cell::new(None),
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ impl History {
|
|||
};
|
||||
let global_scope = self.window.upcast::<GlobalScope>();
|
||||
rooted!(in(*GlobalScope::get_cx()) let mut state = UndefinedValue());
|
||||
if let Err(_) = structuredclone::read(&global_scope, data, state.handle_mut()) {
|
||||
if let Err(_) = structuredclone::read(global_scope, data, state.handle_mut()) {
|
||||
warn!("Error reading structuredclone data");
|
||||
}
|
||||
self.state.set(state.get());
|
||||
|
@ -270,7 +270,7 @@ impl History {
|
|||
// Step 11
|
||||
let global_scope = self.window.upcast::<GlobalScope>();
|
||||
rooted!(in(*cx) let mut state = UndefinedValue());
|
||||
if let Err(_) = structuredclone::read(&global_scope, serialized_data, state.handle_mut()) {
|
||||
if let Err(_) = structuredclone::read(global_scope, serialized_data, state.handle_mut()) {
|
||||
warn!("Error reading structuredclone data");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue