From c761847832e48274938966b2602dea71125c0e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Kongstad?= Date: Thu, 21 Dec 2023 10:28:34 +0100 Subject: [PATCH] aconfig: call Vec::retain instead of Vec::retain_mut Replace a call to Vec::retain_mut with a call to Vec::retain instead: the predicate used doesn't require its parameter to be a *mutable* reference. Bug: N/A Test: atest aconfig.test Change-Id: Iacd5f2ebef358ebc92ae6a1a78dd3045e44196f4 --- tools/aconfig/src/commands.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/aconfig/src/commands.rs b/tools/aconfig/src/commands.rs index 0c4f54326e..261acec733 100644 --- a/tools/aconfig/src/commands.rs +++ b/tools/aconfig/src/commands.rs @@ -650,7 +650,7 @@ mod tests { } let mut parsed_flags = crate::test::parse_test_flags(); - parsed_flags.parsed_flag.retain_mut(|pf| !pf.is_exported()); + parsed_flags.parsed_flag.retain(|pf| !pf.is_exported()); let error = modify_parsed_flags_based_on_mode(parsed_flags, CodegenMode::Exported).unwrap_err(); assert_eq!("exported library contains no exported flags", format!("{:?}", error));