From 60b7d8835d845c057e5cd1cb1188faa6c70d0669 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Fri, 6 Jan 2017 21:29:01 -0800 Subject: [PATCH] [2016][rust][23.1] Fix Instruction Display (thanks, @zenspider!) --- 2016/rust/src/assembunny.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/2016/rust/src/assembunny.rs b/2016/rust/src/assembunny.rs index d6d0063..9871625 100644 --- a/2016/rust/src/assembunny.rs +++ b/2016/rust/src/assembunny.rs @@ -167,10 +167,10 @@ impl fmt::Display for Instruction { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { &Instruction::Cpy(a, b) => write!(f, "cpy {} {}", a, b), - &Instruction::Inc(a) => write!(f, "cpy {}", a), - &Instruction::Dec(a) => write!(f, "cpy {}", a), - &Instruction::Jnz(a, b) => write!(f, "cpy {} {}", a, b), - &Instruction::Tgl(a) => write!(f, "cpy {}", a), + &Instruction::Inc(a) => write!(f, "inc {}", a), + &Instruction::Dec(a) => write!(f, "dec {}", a), + &Instruction::Jnz(a, b) => write!(f, "jnz {} {}", a, b), + &Instruction::Tgl(a) => write!(f, "tgl {}", a), } } }