[librsvg: 16/22] Replace if with match
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 16/22] Replace if with match
- Date: Wed, 1 Jul 2020 00:04:31 +0000 (UTC)
commit 91253bd208b1ec208950f20795b060fcdc60fc55
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Jun 30 15:30:38 2020 -0500
Replace if with match
rsvg_internals/src/properties.rs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/rsvg_internals/src/properties.rs b/rsvg_internals/src/properties.rs
index 2afdcefc..bfad3da0 100644
--- a/rsvg_internals/src/properties.rs
+++ b/rsvg_internals/src/properties.rs
@@ -430,10 +430,10 @@ impl SpecifiedValues {
fn set_property_expanding_shorthands(&mut self, prop: &ParsedProperty, replace: bool) {
use crate::properties::ParsedProperty::*;
- if let Marker(SpecifiedValue::Specified(ref m)) = *prop {
- self.expand_marker(m, replace);
- } else {
- self.set_property(prop, replace);
+ match *prop {
+ Marker(SpecifiedValue::Specified(ref m)) => self.expand_marker(m, replace),
+
+ _ => self.set_property(prop, replace),
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]