Avoid matching with reference patterns.

https://github.com/rust-lang-nursery/rust-clippy/wiki#match_ref_pats
This commit is contained in:
Dan Gohman
2017-08-31 11:59:26 -07:00
parent 5a8d1a9fda
commit 9726bb7367
6 changed files with 54 additions and 54 deletions

View File

@@ -29,9 +29,9 @@ pub enum GlobalVarData {
impl fmt::Display for GlobalVarData {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
&GlobalVarData::VmCtx { offset } => write!(f, "vmctx{}", offset),
&GlobalVarData::Deref { base, offset } => write!(f, "deref({}){}", base, offset),
match *self {
GlobalVarData::VmCtx { offset } => write!(f, "vmctx{}", offset),
GlobalVarData::Deref { base, offset } => write!(f, "deref({}){}", base, offset),
}
}
}