[librsvg: 14/16] clippy: Allow a complex type
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 14/16] clippy: Allow a complex type
- Date: Fri, 16 Sep 2022 01:46:19 +0000 (UTC)
commit 8a3ad20cbae75b6f3cc87ef2246e82200f85f1aa
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Sep 15 19:49:32 2022 -0500
clippy: Allow a complex type
Clippy would stop complaining with
type FilterParseFn<'a, 'i> = &'a dyn Fn(&mut Parser<'i, '_>) -> Result<FilterFunction, ParseError<'i>>;
But that's not easier to read than what there is right now.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/747>
src/filter_func.rs | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/src/filter_func.rs b/src/filter_func.rs
index 019303ec5..e931c8b17 100644
--- a/src/filter_func.rs
+++ b/src/filter_func.rs
@@ -608,19 +608,21 @@ impl Sepia {
}
impl Parse for FilterFunction {
+ #[allow(clippy::type_complexity)]
+ #[rustfmt::skip]
fn parse<'i>(parser: &mut Parser<'i, '_>) -> Result<Self, crate::error::ParseError<'i>> {
let loc = parser.current_source_location();
let fns: Vec<(&str, &dyn Fn(&mut Parser<'i, '_>) -> _)> = vec![
- ("blur", &parse_blur),
- ("brightness", &parse_brightness),
- ("contrast", &parse_contrast),
+ ("blur", &parse_blur),
+ ("brightness", &parse_brightness),
+ ("contrast", &parse_contrast),
("drop-shadow", &parse_dropshadow),
- ("grayscale", &parse_grayscale),
- ("hue-rotate", &parse_huerotate),
- ("invert", &parse_invert),
- ("opacity", &parse_opacity),
- ("saturate", &parse_saturate),
- ("sepia", &parse_sepia),
+ ("grayscale", &parse_grayscale),
+ ("hue-rotate", &parse_huerotate),
+ ("invert", &parse_invert),
+ ("opacity", &parse_opacity),
+ ("saturate", &parse_saturate),
+ ("sepia", &parse_sepia),
];
for (filter_name, parse_fn) in fns {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]