From c34a8c76a2a7c9a8e6024c80f61e92dd897c6ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=99=8E?= Date: Thu, 24 Oct 2024 10:53:17 +0800 Subject: [PATCH] Update chapter_3_2.md --- src/chapter_3_2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chapter_3_2.md b/src/chapter_3_2.md index 76cf1b1..7384fe4 100644 --- a/src/chapter_3_2.md +++ b/src/chapter_3_2.md @@ -178,7 +178,7 @@ pub enum AddressingMode { impl CPU { // ... - fn get_operand_address(&self, mode: &AddressingMode) -> u16 { + fn get_operand_address(&mut self, mode: &AddressingMode) -> u16 { match mode { AddressingMode::Immediate => self.program_counter,