Use new if let syntax wherever possible. Fixes #4153.

This commit is contained in:
Zack Slayton 2015-03-08 18:55:52 -04:00
parent 09c36de8f1
commit 08ac0766ed
25 changed files with 178 additions and 262 deletions

View file

@ -71,9 +71,8 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLTitleElement> {
}
fn child_inserted(&self, child: JSRef<Node>) {
match self.super_type() {
Some(ref s) => s.child_inserted(child),
_ => (),
if let Some(ref s) = self.super_type() {
s.child_inserted(child);
}
let node: JSRef<Node> = NodeCast::from_ref(*self);