[2016][rust][23.1] Fix Instruction Display (thanks, @zenspider!)
change qttzozlwtuukyyrrmwrowpslpzwpxyop
commit 5eb458e41a52a21373555c9f9eaa452886bf94e6
author Alpha Chen <alpha.chen@gmail.com>
date
parent nyvlutko
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),
         }
     }
 }