Combine redundant match arm bodies.

This commit is contained in:
Dan Gohman
2017-11-03 16:40:51 -07:00
parent c7f01f88b2
commit acc6d941a3
6 changed files with 14 additions and 14 deletions

View File

@@ -45,7 +45,7 @@ impl Part {
/// Get the variabled referenced by this part, if any.
pub fn ref_var(&self) -> Option<&str> {
match *self {
Part::Var(ref var) => Some(var),
Part::Var(ref var) |
Part::DefVar { ref var, .. } => Some(var),
_ => None,
}