diff --git a/2016/rust/src/assembunny.rs b/2016/rust/src/assembunny.rs index 9871625..6f09ae6 100644 --- a/2016/rust/src/assembunny.rs +++ b/2016/rust/src/assembunny.rs @@ -10,10 +10,12 @@ pub struct Assembunny { } impl Assembunny { + #[inline(never)] fn instruction(&self, i: usize) -> Option { self.instructions.get(i).cloned() } + #[inline(never)] fn value>(&self, v: V) -> isize { let v: Variable = v.into(); match v { @@ -22,6 +24,7 @@ impl Assembunny { } } + #[inline(never)] fn toggle(&mut self, i: usize) { let instruction = match self.instruction(i) { Some(x) => x, @@ -42,6 +45,7 @@ impl Assembunny { impl Iterator for Assembunny { type Item = Registers; + #[inline(never)] fn next(&mut self) -> Option { let pc = self.value(Register::PC) as usize; let instruction = match self.instruction(pc) {