I feel bad about storing a changed byte as String here
|
pub changed_bytes: HashMap<usize, String>, |
This made representing a byte in ASCII easier (it's used in the ASCII dump besides the hex dump), but it's using more memory than it should. However, changing it to u8 requires lots of changes in other parts of the code.
Another thing I considered was creating a Byte struct that would contain both: the u8 value and its ASCII representation, but I'm not sure which design is the best.
I feel bad about storing a changed byte as
Stringheredz6/src/app.rs
Line 40 in 918d9a4
This made representing a byte in ASCII easier (it's used in the ASCII dump besides the hex dump), but it's using more memory than it should. However, changing it to
u8requires lots of changes in other parts of the code.Another thing I considered was creating a
Bytestruct that would contain both: theu8value and its ASCII representation, but I'm not sure which design is the best.