I was wondering isn't it better for this to error? Although the hex string is valid, it's 33 bytes when decoded. Currently it just cut's the last byte.
let bytes: [u8; 32] = SerdeHex::<StrictPfx>::from_hex("0x06061d5e2a67d0a9a10f1c732bca12a676d83f79663a396f7d87b3e30b9b411088");
PS: If I try 31 bytes, it gives me expected buff size '2' got '1', maybe better error handling here as well?
I was wondering isn't it better for this to error? Although the hex string is valid, it's 33 bytes when decoded. Currently it just cut's the last byte.
PS: If I try 31 bytes, it gives me
expected buff size '2' got '1'
, maybe better error handling here as well?