Skip to content

Add into_inner function to Key, Value and KvPair #12

@sticnarf

Description

@sticnarf

It provides a way of getting the ownership of the inner Vec. It saves one clone when we need the ownership of the data.

An alternative is to implement From<Key> and From<Value> for Vec<u8>. But I prefer the into_inner way.

By the way, is [u8] a better choice for the deref target of Key and Value? [u8] is just a more common deref target in the Rust world. Vec is ok but less comfortable to me and does no good too (I think no one cares about the only addition capacity). This is really of no significance, so I do not open a new issue.

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