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
This commit is contained in:
Mårten Kongstad
2023-12-21 10:28:34 +01:00
parent 85c9c5b81a
commit c761847832

View File

@@ -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));