From 7328eb416acf3b908223f5356763acc0a8fec335 Mon Sep 17 00:00:00 2001 From: Sam M W Date: Tue, 18 Oct 2022 09:38:05 +0100 Subject: [PATCH] misc clippy fixes. --- src/cpu.rs | 2 +- src/instruction.rs | 6 +++--- src/memory.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cpu.rs b/src/cpu.rs index e6d793e..bc54d94 100644 --- a/src/cpu.rs +++ b/src/cpu.rs @@ -25,7 +25,7 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -use crate::address::{Address, AddressDiff}; + use crate::instruction::{self, DecodedInstr, Instruction, OpInput}; use crate::memory::Memory; use crate::registers::{Registers, StackPointer, Status, StatusArgs}; diff --git a/src/instruction.rs b/src/instruction.rs index 4297c86..d9e4ad7 100644 --- a/src/instruction.rs +++ b/src/instruction.rs @@ -25,8 +25,8 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -use crate::address::Address; -use crate::address::AddressDiff; + + use crate::cpu::CPU; // Abbreviations @@ -247,7 +247,7 @@ impl AddressingMode { // Add Y register to this address to get the final address // (Output: a 16-bit address) let start = arr[0]; - let slice = memory.get_slice(u16::from(start), (2)); + let slice = memory.get_slice(u16::from(start), 2); OpInput::UseAddress(arr_to_addr(slice).wrapping_add(xextend(y))) } } diff --git a/src/memory.rs b/src/memory.rs index 705b5c9..e491243 100644 --- a/src/memory.rs +++ b/src/memory.rs @@ -25,8 +25,8 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -use crate::address::{Address, AddressDiff}; -use crate::num::ToPrimitive; +use crate::address::{Address}; + // JAM: We can probably come up with a better way to represent address ranges. // Address range type?