-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
String::from_utf16_lossy signature differs from from_utf8_lossy #32874
Copy link
Copy link
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.P-lowLow priorityLow priority
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.P-lowLow priorityLow priority
Type
Fields
Give feedbackNo fields configured for issues without a type.
String::from_utf8_lossyreturns aCow<'a, str>whileString::from_utf16_lossyreturns simplyString. It would be useful for their signature to both match.String::from_utf16_lossyshould returnCow<'a, str>as well, though this is obviously a breaking, but easily solved, change.