pub fn copy_bits(&self, start: u8) -> Self {
        let mut target = H256::zero();

        let start_byte = (start / BYTE_SIZE) as usize;
        // copy bytes
        target.0[start_byte..].copy_from_slice(&self.0[start_byte..]);

        // reset remain bytes
        let remain = start % BYTE_SIZE;
        if remain > 0 {
            target.0[start_byte] &= 0b11111111 << remain
        }

        target
    }
/// Copy bits and return a new H256
Copy bits and return a new H256
Copy bits and return a new H256
pub fn copy_bits(&self, start: u8) -> Self {
        let mut target = H256::zero();
        let start_byte = (start / BYTE_SIZE) as usize;
        // copy bytes
        target.0[start_byte..].copy_from_slice(&self.0[start_byte..]);
        // reset remain bytes
        let remain = start % BYTE_SIZE;
        if remain > 0 {
            target.0[start_byte] &= 0b11111111 << remain
        }
        target
    }
pub fn copy_bits ( & self , start : u8 ) -> Self { let mut target = H256 :: zero ( ) ; let start_byte = ( start / BYTE_SIZE ) as usize ; // copy bytes target . 0 [ start_byte .. ] . copy_from_slice ( & self . 0 [ start_byte .. ] ) ; // reset remain bytes let remain = start % BYTE_SIZE ; if remain > 0 { target . 0 [ start_byte ] &= 0b11111111 << remain } target }
Copy bits and return a new H256
Copy bits and return a new H256
&self
start
u8
&self
start
u8