Skip to content

web-sys: unnecessary &mut requirement in WebUSB functions, potentially others #3963

Open
@spookyvision

Description

@spookyvision

several WebUSB functions that take a [u8] slice, e.g., transfer_out_with_u8_array, require it be passed as &mut. As far as I can tell this is not required since USB transfers are unidirectional.

full list of affected functions:

other APIs might also be affected - I searched the docs for with_u8_array and found e.g. ReadableByteStreamController::enqueue_with_u8_array taking a &mut buffer which at first glance is only used for reading.

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