1
0
Fork 0
forked from wry/wry

all: address clippy lints

This commit is contained in:
Julian Orth 2024-07-02 17:11:34 +02:00
parent 498e01a8bb
commit 84d7632341
43 changed files with 170 additions and 149 deletions

View file

@ -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];

View file

@ -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));