Skip to content

Simplify Byte Implementations #183

@blitz

Description

@blitz

I'm trying to wrap my head around the different read/write functions in the Byte trait. It seems a bit needlessly intimidating and confusing. For reference, I'm refering to these functions: https://docs.rs/vm-memory/0.7.0/vm_memory/bytes/trait.Bytes.html#tymethod.read

  1. write writes to the Byte object, but write_to actually reads from it. read_into could have been a better name.
  2. Most read/write functions could have default implementations based on read/write but that seems to be prevented by the configurable error type.

Are these desirable changes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions