-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
Description
I get that it's supposed to be a 1 <-> 1 with std::fs::write but it copies whatever you give it and it doesn't even tell you about it until you look at the source code.
A better interface might be something like AsRef<[u8]> + Send + 'static so that you can pass owned data like Vec<u8>, Arc<[u8]>, bytes::Bytes...
However this is a breaking change as &[u8] could no longer be sent.
So either a new API for this or comment clearly that this will clone the data.
Reactions are currently unavailable