Skip to content

Commit 4a472b8

Browse files
committed
uucore: format: Use .into_owned() for from_utf8_lossy()
Suggested by Gemini and I think that's not a bad idea.
1 parent 045c269 commit 4a472b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/uucore/src/lib/features/format/argument.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ impl<'a> FormatArguments<'a> {
159159
if bytes.len() > len {
160160
return Err(ExtendedParserError::PartialMatch(
161161
val,
162-
String::from_utf8_lossy(&bytes[len..]).to_string(),
162+
String::from_utf8_lossy(&bytes[len..]).into_owned(),
163163
));
164164
}
165165

0 commit comments

Comments
 (0)