зеркало из https://github.com/mozilla/fxrecord.git
Fix up cargo clippy lint errors
This commit is contained in:
Родитель
c93ce6abd5
Коммит
8c461d45de
|
@ -7,7 +7,7 @@ mod config;
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
use slog::{info, Logger};
|
use slog::Logger;
|
||||||
use structopt::StructOpt;
|
use structopt::StructOpt;
|
||||||
|
|
||||||
use crate::config::Config;
|
use crate::config::Config;
|
||||||
|
@ -23,7 +23,7 @@ struct Options {
|
||||||
|
|
||||||
impl CommonOptions for Options {
|
impl CommonOptions for Options {
|
||||||
fn config_path(&self) -> &Path {
|
fn config_path(&self) -> &Path {
|
||||||
return &self.config_path;
|
&self.config_path
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +31,6 @@ fn main() {
|
||||||
run::<Options, Config, _>(fxrecorder, "fxrecorder");
|
run::<Options, Config, _>(fxrecorder, "fxrecorder");
|
||||||
}
|
}
|
||||||
|
|
||||||
fn fxrecorder(log: Logger, _options: Options, _config: Config) -> Result<(), Box<dyn Error>> {
|
fn fxrecorder(_log: Logger, _options: Options, _config: Config) -> Result<(), Box<dyn Error>> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ mod config;
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
use slog::{info, Logger};
|
use slog::Logger;
|
||||||
use structopt::StructOpt;
|
use structopt::StructOpt;
|
||||||
|
|
||||||
use crate::config::Config;
|
use crate::config::Config;
|
||||||
|
@ -23,7 +23,7 @@ struct Options {
|
||||||
|
|
||||||
impl CommonOptions for Options {
|
impl CommonOptions for Options {
|
||||||
fn config_path(&self) -> &Path {
|
fn config_path(&self) -> &Path {
|
||||||
return &self.config_path;
|
&self.config_path
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +31,6 @@ fn main() {
|
||||||
run::<Options, Config, _>(fxrunner, "fxrunner");
|
run::<Options, Config, _>(fxrunner, "fxrunner");
|
||||||
}
|
}
|
||||||
|
|
||||||
fn fxrunner(log: Logger, _options: Options, _config: Config) -> Result<(), Box<dyn Error>> {
|
fn fxrunner(_log: Logger, _options: Options, _config: Config) -> Result<(), Box<dyn Error>> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ where
|
||||||
.and_then(|table| table.remove(section))
|
.and_then(|table| table.remove(section))
|
||||||
.ok_or_else(|| ConfigError::MissingSection {
|
.ok_or_else(|| ConfigError::MissingSection {
|
||||||
path: PathBuf::from(path),
|
path: PathBuf::from(path),
|
||||||
section: section.into(),
|
section,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.and_then(|val| {
|
.and_then(|val| {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче