fn swap(cpu: &mut Cpu, v: u8) -> u8 {
        cpu.set_zero(v == 0);
        cpu.set_substract(false);
        cpu.set_halfcarry(false);
        cpu.set_carry(false);

        (v << 4) | (v >> 4)
    }
/// Helper function to swap the two nibbles in a `u8` and update
/// cpu flags.
Helper function to swap the two nibbles in a `u8` and update
cpu flags.
Helper function to swap the two nibbles in a ` u8 ` and update cpu flags .
fn swap(cpu: &mut Cpu, v: u8) -> u8 {
        cpu.set_zero(v == 0);
        cpu.set_substract(false);
        cpu.set_halfcarry(false);
        cpu.set_carry(false);
        (v << 4) | (v >> 4)
    }
fn swap ( cpu : & mut Cpu , v : u8 ) -> u8 { cpu . set_zero ( v == 0 ) ; cpu . set_substract ( false ) ; cpu . set_halfcarry ( false ) ; cpu . set_carry ( false ) ; ( v << 4 ) | ( v >> 4 ) }
Helper function to swap the two nibbles in a `u8` and update
cpu flags.
Helper function to swap the two nibbles in a ` u8 ` and update cpu flags .
cpu
&mut Cpu
v
u8
cpu
&mut Cpu
v
u8