fix some pedantic lints

This commit is contained in:
Dr. Matthias Ratajczak
2023-02-14 14:02:37 +01:00
parent 899461289d
commit 689e5532c1
6 changed files with 7 additions and 12 deletions
@@ -5,7 +5,7 @@ use alpm::Alpm;
use alpm::PackageReason::Explicit;
use anyhow::{Context, Result};
use crate::backend::backend_trait::*;
use crate::backend::backend_trait::{Backend, Switches, Text};
use crate::{impl_backend_constants, Group, Package};
#[derive(Debug)]
@@ -6,7 +6,7 @@ use std::process::ExitStatus;
use anyhow::{Context, Result};
use serde_json::Value;
use crate::backend::backend_trait::*;
use crate::backend::backend_trait::{Backend, Switches, Text};
use crate::{impl_backend_constants, Group, Package};
#[derive(Debug)]
+2 -3
View File
@@ -25,9 +25,8 @@ impl Config {
if e.kind() == ErrorKind::NotFound {
println!("creating default config under {}", file.to_string_lossy());
return Self::use_default_and_save_to(file);
} else {
bail!("unexpected error occured: {e:?}");
};
}
bail!("unexpected error occured: {e:?}");
}
let content = from_file.expect("we already handled that error");