From 4e5a65ee41372ca9bd35501e251b1b7bf799665e Mon Sep 17 00:00:00 2001 From: Sudhakar Verma Date: Fri, 12 Jan 2024 16:23:38 +0530 Subject: [PATCH] printf: fix clippy warnings --- src/uu/printf/src/printf.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/uu/printf/src/printf.rs b/src/uu/printf/src/printf.rs index 64a3a35a7..b0988f7b4 100644 --- a/src/uu/printf/src/printf.rs +++ b/src/uu/printf/src/printf.rs @@ -47,9 +47,8 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> { } // See #5815 - We don't need to iter on args if no format string seen - let format_seen = parse_spec_and_escape(format_string.as_ref()) - .into_iter() - .any(|r| matches!(r, Ok(FormatItem::Spec(_)))); + let format_seen = + parse_spec_and_escape(format_string.as_ref()).any(|r| matches!(r, Ok(FormatItem::Spec(_)))); if !format_seen { return Ok(()); }