pretty-hex icon indicating copy to clipboard operation
pretty-hex copied to clipboard

hex_conf address showing too many zeroes

Open Sharpiro opened this issue 4 months ago • 0 comments

hex_conf is showing too many zeroes when at the end of a u16 range.

    #[test]
    fn test() {
        let hex_config = HexConfig {
            title: false,
            display_offset: 0xfff0,
            ascii: false,
            ..Default::default()
        };
        assert_eq!(
            "fff0:   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00",
            format!("{buffer:?}", buffer = [0; 16].hex_conf(hex_config))
        );
    }
assertion `left == right` failed
  left: "fff0:   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00"
 right: "00fff0:   00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00"

Sharpiro avatar Oct 25 '24 16:10 Sharpiro