[librsvg: 6/10] Use AttributeResultExt.attribute() to shorten a function
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 6/10] Use AttributeResultExt.attribute() to shorten a function
- Date: Thu, 2 May 2019 15:34:20 +0000 (UTC)
commit b2ab5513f2bfda7afa4a016bdf3e73d7a1f0c51d
Author: Federico Mena Quintero <federico gnome org>
Date: Thu May 2 09:07:29 2019 -0500
Use AttributeResultExt.attribute() to shorten a function
rsvg_internals/src/node.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/rsvg_internals/src/node.rs b/rsvg_internals/src/node.rs
index 161a188a..04c435d6 100644
--- a/rsvg_internals/src/node.rs
+++ b/rsvg_internals/src/node.rs
@@ -353,9 +353,9 @@ impl Node {
fn set_transform_attribute(&self, pbag: &PropertyBag<'_>) -> Result<(), NodeError> {
for (attr, value) in pbag.iter() {
match attr {
- Attribute::Transform => match Matrix::parse_str(value) {
+ Attribute::Transform => match Matrix::parse_str(value).attribute(Attribute::Transform) {
Ok(affine) => self.data.transform.set(affine),
- Err(e) => return Err(NodeError::attribute_error(Attribute::Transform, e)),
+ Err(e) => return Err(e),
},
_ => (),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]