all: address clippy lints
This commit is contained in:
parent
498e01a8bb
commit
84d7632341
43 changed files with 170 additions and 149 deletions
|
|
@ -1,7 +1,6 @@
|
|||
use {
|
||||
crate::{
|
||||
config::{
|
||||
context::Context,
|
||||
extractor::ExtractorError,
|
||||
parser::{DataType, ParseResult, Parser, UnexpectedDataType},
|
||||
},
|
||||
|
|
@ -12,7 +11,7 @@ use {
|
|||
thiserror::Error,
|
||||
};
|
||||
|
||||
pub struct ColorParser<'a>(pub &'a Context<'a>);
|
||||
pub struct ColorParser;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum ColorParserError {
|
||||
|
|
@ -28,7 +27,7 @@ pub enum ColorParserError {
|
|||
ParseIntError(#[from] ParseIntError),
|
||||
}
|
||||
|
||||
impl Parser for ColorParser<'_> {
|
||||
impl Parser for ColorParser {
|
||||
type Value = Color;
|
||||
type Error = ColorParserError;
|
||||
const EXPECTED: &'static [DataType] = &[DataType::String];
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ impl Parser for ThemeParser<'_> {
|
|||
($e:expr) => {
|
||||
match $e {
|
||||
None => None,
|
||||
Some(v) => match v.parse(&mut ColorParser(self.0)) {
|
||||
Some(v) => match v.parse(&mut ColorParser) {
|
||||
Ok(v) => Some(v),
|
||||
Err(e) => {
|
||||
log::warn!("Could not parse a color: {}", self.0.error(e));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue