apply some pedantic lints

This commit is contained in:
timeshifter
2023-01-14 18:23:48 +01:00
parent 0e84bf9bc4
commit e7b80b5bff
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -224,7 +224,7 @@ impl Pacdef {
fn remove_groups(&self, arg_match: &ArgMatches) -> Result<()> {
let paths = get_assumed_group_file_names(arg_match)?;
for file in paths.iter() {
for file in &paths {
ensure!(file.exists(), "did not find the group under {file:?}");
}
+1 -1
View File
@@ -7,7 +7,7 @@ pub(crate) fn get_editor() -> Result<String> {
}
fn check_vars_in_order(vars: &[&str]) -> Option<String> {
vars.iter().flat_map(|v| var(v).ok()).next()
vars.iter().find_map(|v| var(v).ok())
}
pub(crate) fn get_single_var(variable: &str) -> Option<String> {