Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mutable slice passed for FileSystemSyncAccessHandle 's write functions in web_sys #3536

Closed
kipcode66 opened this issue Jul 28, 2023 · 0 comments · Fixed by #3537
Closed

Mutable slice passed for FileSystemSyncAccessHandle 's write functions in web_sys #3536

kipcode66 opened this issue Jul 28, 2023 · 0 comments · Fixed by #3537
Labels

Comments

@kipcode66
Copy link
Contributor

Describe the Bug

The type FileSystemSyncAccessHandle of the web_sys crate has two write functions which can take a u8 slice to write to the handle. However, the slice has to be passed as mutable, which can be a problem if you want to integrate it with any kind of Write trait from std or other synchronous or asynchronous crates, which only provide an immutable reference to the slice of data to write.

Steps to Reproduce

N/A

Expected Behavior

I expect the write functions write_with_u8_array and write_with_u8_array_and_options to take an immutable reference for the slice of data to write.

Actual Behavior

The write functions write_with_u8_array and write_with_u8_array_and_options only accept mutable slices.

Additional Context

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant