From 95e07a2b5658d4c6e3cd5b2a8d3e1e88dc154c7a Mon Sep 17 00:00:00 2001 From: Nick Krichevsky Date: Sat, 17 Jun 2023 14:45:53 -0400 Subject: [PATCH] Satisfy clippy --- src/cpu/run/arith8/binary.rs | 8 ++++---- src/cpu/run/arithutil.rs | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/cpu/run/arith8/binary.rs b/src/cpu/run/arith8/binary.rs index 33a4cd6..b920729 100644 --- a/src/cpu/run/arith8/binary.rs +++ b/src/cpu/run/arith8/binary.rs @@ -13,11 +13,11 @@ use crate::{ use super::{OperationFlagOutput, OperationOutput}; pub fn run_add(processor: &mut Processor, operand: Operand) -> Result<(), Error> { - run_operation(processor, operand, |lhs, rhs| run_add_on_operands(lhs, rhs)) + run_operation(processor, operand, run_add_on_operands) } pub fn run_add_with_carry(processor: &mut Processor, operand: Operand) -> Result<(), Error> { - run_operation_with_carry(processor, operand, |lhs, rhs| run_add_on_operands(lhs, rhs)) + run_operation_with_carry(processor, operand, run_add_on_operands) } fn run_add_on_operands(lhs: u8, rhs: T) -> OperationOutput @@ -33,11 +33,11 @@ where } pub fn run_sub(processor: &mut Processor, operand: Operand) -> Result<(), Error> { - run_operation(processor, operand, |lhs, rhs| run_sub_on_operands(lhs, rhs)) + run_operation(processor, operand, run_sub_on_operands) } pub fn run_sub_with_carry(processor: &mut Processor, operand: Operand) -> Result<(), Error> { - run_operation_with_carry(processor, operand, |lhs, rhs| run_sub_on_operands(lhs, rhs)) + run_operation_with_carry(processor, operand, run_sub_on_operands) } fn run_sub_on_operands(lhs: u8, rhs: T) -> OperationOutput diff --git a/src/cpu/run/arithutil.rs b/src/cpu/run/arithutil.rs index 4c29e0a..c8fa3b6 100644 --- a/src/cpu/run/arithutil.rs +++ b/src/cpu/run/arithutil.rs @@ -43,6 +43,7 @@ where } /// Get the number and its carry bit directly + #[allow(dead_code)] // I think this is valuable to have in a public interface pub fn raw_values(self) -> (N, u8) { (self.num, self.carry_bit) }