[librsvg] cargo-clippy: Remove redundant closures in transform.rs
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] cargo-clippy: Remove redundant closures in transform.rs
- Date: Thu, 22 Feb 2018 19:54:47 +0000 (UTC)
commit aafcfdb37499628f78c6996ba37f4643f8a8cc5b
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Feb 22 13:04:43 2018 -0600
cargo-clippy: Remove redundant closures in transform.rs
rust/src/transform.rs | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/rust/src/transform.rs b/rust/src/transform.rs
index a4ea150d..8ee42843 100644
--- a/rust/src/transform.rs
+++ b/rust/src/transform.rs
@@ -102,7 +102,7 @@ fn parse_matrix_args(parser: &mut Parser) -> Result<cairo::Matrix, AttributeErro
Ok(cairo::Matrix::new(xx, yx, xy, yy, x0, y0))
}).map_err(CssParseError::<()>::basic)
- .map_err(|e| AttributeError::from(e))
+ .map_err(AttributeError::from)
}
fn parse_translate_args(parser: &mut Parser) -> Result<cairo::Matrix, AttributeError> {
@@ -116,7 +116,7 @@ fn parse_translate_args(parser: &mut Parser) -> Result<cairo::Matrix, AttributeE
Ok(cairo::Matrix::new(1.0, 0.0, 0.0, 1.0, tx, ty))
}).map_err(CssParseError::<()>::basic)
- .map_err(|e| AttributeError::from(e))
+ .map_err(AttributeError::from)
}
fn parse_scale_args(parser: &mut Parser) -> Result<cairo::Matrix, AttributeError> {
@@ -130,7 +130,7 @@ fn parse_scale_args(parser: &mut Parser) -> Result<cairo::Matrix, AttributeError
Ok(cairo::Matrix::new(x, 0.0, 0.0, y, 0.0, 0.0))
}).map_err(CssParseError::<()>::basic)
- .map_err(|e| AttributeError::from(e))
+ .map_err(AttributeError::from)
}
fn parse_rotate_args(parser: &mut Parser) -> Result<cairo::Matrix, AttributeError> {
@@ -154,7 +154,7 @@ fn parse_rotate_args(parser: &mut Parser) -> Result<cairo::Matrix, AttributeErro
m = cairo::Matrix::multiply (&cairo::Matrix::new (1.0, 0.0, 0.0, 1.0, -tx, -ty), &m);
Ok(m)
}).map_err(CssParseError::<()>::basic)
- .map_err(|e| AttributeError::from(e))
+ .map_err(AttributeError::from)
}
fn parse_skewx_args(parser: &mut Parser) -> Result<cairo::Matrix, AttributeError> {
@@ -164,7 +164,7 @@ fn parse_skewx_args(parser: &mut Parser) -> Result<cairo::Matrix, AttributeError
a.tan (), 1.0,
0.0, 0.0))
}).map_err(CssParseError::<()>::basic)
- .map_err(|e| AttributeError::from(e))
+ .map_err(AttributeError::from)
}
fn parse_skewy_args(parser: &mut Parser) -> Result<cairo::Matrix, AttributeError> {
@@ -174,7 +174,7 @@ fn parse_skewy_args(parser: &mut Parser) -> Result<cairo::Matrix, AttributeError
0.0, 1.0,
0.0, 0.0))
}).map_err(CssParseError::<()>::basic)
- .map_err(|e| AttributeError::from(e))
+ .map_err(AttributeError::from)
}
#[cfg(test)]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]