clippy lints
This commit is contained in:
parent
b4f27c5f8c
commit
a8e5d09ff0
2 changed files with 4 additions and 5 deletions
|
@ -27,9 +27,8 @@ pub fn load_config() -> Result<Config, serde_yaml::Error> {
|
||||||
let config_file: Result<YamlArgs, _> = {
|
let config_file: Result<YamlArgs, _> = {
|
||||||
let config_path = cli_args
|
let config_path = cli_args
|
||||||
.config_path
|
.config_path
|
||||||
.as_ref()
|
.as_deref()
|
||||||
.map(PathBuf::as_path)
|
.unwrap_or_else(|| Path::new("./settings.yaml"));
|
||||||
.unwrap_or(Path::new("./settings.yaml"));
|
|
||||||
match File::open(config_path) {
|
match File::open(config_path) {
|
||||||
Ok(file) => serde_yaml::from_reader(file),
|
Ok(file) => serde_yaml::from_reader(file),
|
||||||
Err(e) if e.kind() == ErrorKind::NotFound => {
|
Err(e) if e.kind() == ErrorKind::NotFound => {
|
||||||
|
@ -138,7 +137,7 @@ struct YamlExtendedOptions {
|
||||||
logging_level: LevelFilter,
|
logging_level: LevelFilter,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn default_logging_level() -> LevelFilter {
|
const fn default_logging_level() -> LevelFilter {
|
||||||
LevelFilter::Info
|
LevelFilter::Info
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ impl Display for Port {
|
||||||
pub struct Mebibytes(usize);
|
pub struct Mebibytes(usize);
|
||||||
|
|
||||||
impl Mebibytes {
|
impl Mebibytes {
|
||||||
pub const fn get(&self) -> usize {
|
pub const fn get(self) -> usize {
|
||||||
self.0
|
self.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue