Skip to content

String::from_utf16_lossy signature differs from from_utf8_lossy #32874

Closed
@VoidStarKat

Description

@VoidStarKat

String::from_utf8_lossy returns a Cow<'a, str> while String::from_utf16_lossy returns simply String. It would be useful for their signature to both match. String::from_utf16_lossy should return Cow<'a, str> as well, though this is obviously a breaking, but easily solved, change.

Metadata

Metadata

Assignees

Labels

A-docsArea: 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.P-lowLow priority

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions