Skip to content

Support for Bytes from bytes crate #45

Open
@xfbs

Description

@xfbs

Hey all,

Awesome crate! I'm using this in diff.rs to diff crates in the browser.

I'm using the Bytes crate to keep crate files in memory because it lets me keep stuff around in a reference-counted way and it also lets me create views into that. I have to use a bit of an ugly hack right now to make this work with similar because you guys currently only support byte slices &[u8] , but I want to turn these back into Bytes structs.

Looking at the code, it should be fairly simple to add native support for Bytes into the crate by implementing the DiffableStr trait for Bytes, perhaps as a feature flag.

Is this something you guys would be interested in? If so, I might implement it and create a merge request.

Cheers,
Patrick!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions