uucore: format: Use .into_owned() for from_utf8_lossy()

Suggested by Gemini and I think that's not a bad idea.
This commit is contained in:
Nicolas Boichat
2025-07-16 00:28:34 +02:00
committed by Dorian Péron
parent 668cefb2e4
commit ccad817415
@@ -159,7 +159,7 @@ impl<'a> FormatArguments<'a> {
if bytes.len() > len {
return Err(ExtendedParserError::PartialMatch(
val,
String::from_utf8_lossy(&bytes[len..]).to_string(),
String::from_utf8_lossy(&bytes[len..]).into_owned(),
));
}