Skip to content

BufferType::SliceData should not take a Vec<u8> as parameter #15

@Gnurou

Description

@Gnurou

Taking a Vec here means the client is likely to make an unneeded copy of the input data. Turning this parameter into a &[u8] means adding a lifetime parameter to the whole of BufferType...

Maybe the solution is to use the types of the members directly for Buffer::new, and remove BufferType altogether? This would need a new trait to obtain the (ptr, size) tuple but is probably cleaner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions