Avoid unnecessary '&' in matches.
https://github.com/rust-lang-nursery/rust-clippy/wiki#match_ref_pats
This commit is contained in:
@@ -10,8 +10,8 @@ use ir::{self, InstBuilder};
|
||||
/// Expand a `global_addr` instruction according to the definition of the global variable.
|
||||
pub fn expand_global_addr(inst: ir::Inst, func: &mut ir::Function, _cfg: &mut ControlFlowGraph) {
|
||||
// Unpack the instruction.
|
||||
let gv = match &func.dfg[inst] {
|
||||
&ir::InstructionData::UnaryGlobalVar { opcode, global_var } => {
|
||||
let gv = match func.dfg[inst] {
|
||||
ir::InstructionData::UnaryGlobalVar { opcode, global_var } => {
|
||||
assert_eq!(opcode, ir::Opcode::GlobalAddr);
|
||||
global_var
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ use ir::condcodes::IntCC;
|
||||
/// Expand a `heap_addr` instruction according to the definition of the heap.
|
||||
pub fn expand_heap_addr(inst: ir::Inst, func: &mut ir::Function, _cfg: &mut ControlFlowGraph) {
|
||||
// Unpack the instruction.
|
||||
let (heap, offset, size) = match &func.dfg[inst] {
|
||||
&ir::InstructionData::HeapAddr {
|
||||
let (heap, offset, size) = match func.dfg[inst] {
|
||||
ir::InstructionData::HeapAddr {
|
||||
opcode,
|
||||
heap,
|
||||
arg,
|
||||
|
||||
Reference in New Issue
Block a user