From ccad817415f8ecaf63c7e261a75dd5bbe6174bb1 Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Fri, 11 Jul 2025 22:35:56 +0800 Subject: [PATCH] uucore: format: Use .into_owned() for from_utf8_lossy() Suggested by Gemini and I think that's not a bad idea. --- src/uucore/src/lib/features/format/argument.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uucore/src/lib/features/format/argument.rs b/src/uucore/src/lib/features/format/argument.rs index e1c466640..935f28826 100644 --- a/src/uucore/src/lib/features/format/argument.rs +++ b/src/uucore/src/lib/features/format/argument.rs @@ -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(), )); }