mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix some "unnecessary parentheses" warnings
This commit is contained in:
parent
6e3fba97bd
commit
897a5b39c5
8 changed files with 9 additions and 9 deletions
|
@ -103,7 +103,7 @@ impl CSSRuleList {
|
|||
let parent_stylesheet = &*self.parent_stylesheet;
|
||||
let dom_rule = CSSRule::new_specific(&window, parent_stylesheet, new_rule);
|
||||
self.dom_rules.borrow_mut().insert(index, MutNullableDom::new(Some(&*dom_rule)));
|
||||
Ok((idx))
|
||||
Ok(idx)
|
||||
}
|
||||
|
||||
// In case of a keyframe rule, index must be valid.
|
||||
|
|
|
@ -106,7 +106,7 @@ impl PerformanceObserverMethods for PerformanceObserver {
|
|||
// step 2
|
||||
// There must be at least one valid entry type.
|
||||
if entry_types.is_empty() {
|
||||
return Err((Error::Type("entryTypes cannot be empty".to_string())));
|
||||
return Err(Error::Type("entryTypes cannot be empty".to_string()));
|
||||
}
|
||||
|
||||
// step 3-4-5
|
||||
|
|
|
@ -39,14 +39,14 @@ impl Screen {
|
|||
let (send, recv) = ipc::channel::<(Size2D<u32>)>().unwrap();
|
||||
self.window.upcast::<GlobalScope>()
|
||||
.script_to_constellation_chan().send(ScriptMsg::GetScreenSize(send)).unwrap();
|
||||
recv.recv().unwrap_or((Size2D::zero()))
|
||||
recv.recv().unwrap_or(Size2D::zero())
|
||||
}
|
||||
|
||||
fn screen_avail_size(&self) -> Size2D<u32> {
|
||||
let (send, recv) = ipc::channel::<(Size2D<u32>)>().unwrap();
|
||||
self.window.upcast::<GlobalScope>()
|
||||
.script_to_constellation_chan().send(ScriptMsg::GetScreenAvailSize(send)).unwrap();
|
||||
recv.recv().unwrap_or((Size2D::zero()))
|
||||
recv.recv().unwrap_or(Size2D::zero())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue