You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a user of the library, I would expect the implementation to conform to the documentation, which also matches the behavior of std::string::String::truncate. No effect would be least surprising, a panic is not. Though, as an alternative, adjusting the documentation to match the current behavior would at least be less surprising than there being a mismatch.
The text was updated successfully, but these errors were encountered:
The documentation for Utf16String::truncate says that
But because of the assertion in that method, this is not true. If
new_len
is greater than the string's current length,truncate
will always panic.widestring-rs/src/utfstring.rs
Line 1527 in c731486
As a user of the library, I would expect the implementation to conform to the documentation, which also matches the behavior of
std::string::String::truncate
. No effect would be least surprising, a panic is not. Though, as an alternative, adjusting the documentation to match the current behavior would at least be less surprising than there being a mismatch.The text was updated successfully, but these errors were encountered: