diff options
| author | jfager <jfager@gmail.com> | 2014-11-29 16:41:21 -0500 |
|---|---|---|
| committer | jfager <jfager@gmail.com> | 2014-11-29 16:41:21 -0500 |
| commit | 232ffa039ddb349c9e9c08d0872aaf95970a1369 (patch) | |
| tree | e502451f6717605305e19c8fbcc8902f617c0a36 /src/libsyntax/ast_map | |
| parent | 6163581451a089a8d07bed4dba058677ee4a21f3 (diff) | |
Replace some verbose match statements with their `if let` equivalent.
No semantic changes, no enabling `if let` where it wasn't already enabled.
Diffstat (limited to 'src/libsyntax/ast_map')
| -rw-r--r-- | src/libsyntax/ast_map/mod.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libsyntax/ast_map/mod.rs b/src/libsyntax/ast_map/mod.rs index 6b97b931ef7..2913666a315 100644 --- a/src/libsyntax/ast_map/mod.rs +++ b/src/libsyntax/ast_map/mod.rs @@ -776,11 +776,8 @@ impl<'ast> Visitor<'ast> for NodeCollector<'ast> { } ItemTrait(_, _, ref bounds, ref trait_items) => { for b in bounds.iter() { - match *b { - TraitTyParamBound(ref t) => { - self.insert(t.trait_ref.ref_id, NodeItem(i)); - } - _ => {} + if let TraitTyParamBound(ref t) = *b { + self.insert(t.trait_ref.ref_id, NodeItem(i)); } } |
