Documentation of the From<String> impl for OsString misleading #72349
Labels
C-bug
Category: This is a bug.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
The documentation of
From<String>
forOsString
readsThe implementation is platform-specific, but from a quick glance none of the implementations I looked at does seem to actually copy the data.
The documentation of
From<String>
forPatBbuf
readsIt is implemented using
OsString::from::<String>
:So clearly something is off here. Even when all current implementations of the
String
toOsString
conversion avoid copying, the documentation does not necessarily need to commit to this property, but neither should it state that the implementation allocates and copies if it actually doesn't.The text was updated successfully, but these errors were encountered: