Skip to content

Better changed_bytes #3

@merces

Description

@merces

I feel bad about storing a changed byte as String here

dz6/src/app.rs

Line 40 in 918d9a4

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions