[librsvg: 5/8] parse_property - make the shorthands case symmetrical to the others
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 5/8] parse_property - make the shorthands case symmetrical to the others
- Date: Sat, 18 Sep 2021 00:29:17 +0000 (UTC)
commit 8b6d6798898432c69a984c16d3021bdc1a2efbaa
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Sep 17 18:39:49 2021 -0500
parse_property - make the shorthands case symmetrical to the others
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/591>
src/properties.rs | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/src/properties.rs b/src/properties.rs
index e593bba1..9a5f7e9b 100644
--- a/src/properties.rs
+++ b/src/properties.rs
@@ -370,16 +370,11 @@ macro_rules! make_properties {
)+
$(
- expanded_name!("", $short_str) => {
+ expanded_name!("", $short_str) if parse_as == ParseAs::Property => {
// No shorthand has a presentation attribute.
assert!($short_presentation_attr == PresentationAttr::No);
- if parse_as == ParseAs::Property {
- Ok(ParsedProperty::$short_name(parse_input(input)?))
- } else {
- let loc = input.current_source_location();
- Err(loc.new_custom_error(ValueErrorKind::UnknownProperty))
- }
+ Ok(ParsedProperty::$short_name(parse_input(input)?))
}
)+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]