[librsvg: 4/10] Make Selector a type alias for String, to clarify what goes into CssRules
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 4/10] Make Selector a type alias for String, to clarify what goes into CssRules
- Date: Thu, 2 May 2019 15:34:09 +0000 (UTC)
commit 2ac5541c5ce6176378adf672f1b91ba322175882
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Apr 30 21:51:05 2019 -0500
Make Selector a type alias for String, to clarify what goes into CssRules
rsvg_internals/src/css.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/rsvg_internals/src/css.rs b/rsvg_internals/src/css.rs
index 8eba611d..d3f6c719 100644
--- a/rsvg_internals/src/css.rs
+++ b/rsvg_internals/src/css.rs
@@ -25,10 +25,12 @@ struct Declaration {
// Maps property_name -> Declaration
type DeclarationList = HashMap<String, Declaration>;
+type Selector = String;
+
/// Contains all the mappings of selectors to style declarations
/// that result from loading an SVG document.
pub struct CssRules {
- selectors_to_declarations: HashMap<String, DeclarationList>,
+ selectors_to_declarations: HashMap<Selector, DeclarationList>,
}
impl CssRules {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]