anchor-coverage 0.3.1

A wrapper around `anchor test` for computing test coverage
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[derive(Clone, Copy, Default)]
pub struct Insn(u64);

impl std::fmt::Debug for Insn {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        // smoelius: Reverse the instructions' bytes so that they appear as they would in a hex
        // dump of the file.
        f.write_fmt(format_args!("0x{:016x}", self.0.swap_bytes()))
    }
}

impl From<u64> for Insn {
    fn from(value: u64) -> Self {
        Self(value)
    }
}