Fix some "unnecessary parentheses" warnings

This commit is contained in:
Simon Sapin 2018-01-21 09:02:56 +01:00
parent 6e3fba97bd
commit 897a5b39c5
8 changed files with 9 additions and 9 deletions

View file

@ -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.

View file

@ -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

View file

@ -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())
}
}