fn patch_jump(&mut self, offset: usize) {
        let jump = self.last_byte() - offset - 2;

        if jump > u16::MAX.into() {
            panic!("To much code to jump over.");
        }

        let bytes = (jump as u16).to_le_bytes();

        self.replace_byte(offset, bytes[0]);
        self.replace_byte(offset + 1, bytes[1]);
    }
/// Go back into the bytecode stream and replace the operand
/// at the given location with the calculated jump offset.
Go back into the bytecode stream and replace the operand
at the given location with the calculated jump offset.
Go back into the bytecode stream and replace the operand at the given location with the calculated jump offset .
fn patch_jump(&mut self, offset: usize) {
        let jump = self.last_byte() - offset - 2;
        if jump > u16::MAX.into() {
            panic!("To much code to jump over.");
        }
        let bytes = (jump as u16).to_le_bytes();
        self.replace_byte(offset, bytes[0]);
        self.replace_byte(offset + 1, bytes[1]);
    }
fn patch_jump ( & mut self , offset : usize ) { let jump = self . last_byte ( ) - offset - 2 ; if jump > u16 :: MAX . into ( ) { panic ! ( " " ) ; } let bytes = ( jump as u16 ) . to_le_bytes ( ) ; self . replace_byte ( offset , bytes [ 0 ] ) ; self . replace_byte ( offset + 1 , bytes [ 1 ] ) ; }
Go back into the bytecode stream and replace the operand
at the given location with the calculated jump offset.
Go back into the bytecode stream and replace the operand at the given location with the calculated jump offset .
&mut self
offset
usize