[librsvg] pattern.rs: shorten the way we map option values
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] pattern.rs: shorten the way we map option values
- Date: Fri, 1 Sep 2017 16:31:53 +0000 (UTC)
commit d6683eb7ebb6fe4f3efd7c82e706caf9970ed756
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Sep 1 11:30:38 2017 -0500
pattern.rs: shorten the way we map option values
Thanks to Sergey Bugaev for the tip.
rust/src/pattern.rs | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/rust/src/pattern.rs b/rust/src/pattern.rs
index 53dd72f..901cb73 100644
--- a/rust/src/pattern.rs
+++ b/rust/src/pattern.rs
@@ -200,7 +200,7 @@ impl NodeTrait for NodePattern {
p.units = property_bag::parse_or_none (pbag, "patternUnits")?;
p.content_units = property_bag::parse_or_none (pbag, "patternContentUnits")?;
- p.vbox = property_bag::parse_or_none (pbag, "viewBox")?.map (|v| Some(v)).or (None);
+ p.vbox = property_bag::parse_or_none (pbag, "viewBox")?.map (Some).or (None);
p.preserve_aspect_ratio = property_bag::parse_or_none (pbag, "preserveAspectRatio")?;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]