diff --git a/src/bit_utilities.rs b/src/bit_utilities.rs index 78186b8..e4433d8 100644 --- a/src/bit_utilities.rs +++ b/src/bit_utilities.rs @@ -198,11 +198,10 @@ pub fn binary_subtraction(minuend: &BasicRegister, subtrahend: &BasicRegister) - match final_carry { true => { - let mut complement = vec![false; difference.len() - 1]; - complement.append(&mut vec![true]); + let mut complement: Vec = vec![false; difference.len() - 1]; + complement.extend([true]); binary_sum(&difference, &BasicRegister::new(complement.into())) } false => difference.negated(), } - // BasicRegister::default() }