From 72d3f3fffabe6872eb7839585bea925b89aac6a4 Mon Sep 17 00:00:00 2001 From: Martin Haug Date: Wed, 8 Jun 2022 18:43:00 +0200 Subject: CR: Whoever said orange is the new pink was seriously disturbed. --- src/model/content.rs | 2 +- src/model/styles.rs | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) (limited to 'src/model') diff --git a/src/model/content.rs b/src/model/content.rs index 2b9eb182..3e27c02f 100644 --- a/src/model/content.rs +++ b/src/model/content.rs @@ -206,7 +206,7 @@ impl Content { /// Assign a role to this content by adding a style map. pub fn role(self, role: Role) -> Self { - self.styled_with_map(StyleMap::with_role(role)) + self.styled_with_entry(StyleEntry::Role(role)) } /// Reenable the show rule identified by the selector. diff --git a/src/model/styles.rs b/src/model/styles.rs index 7db2df42..7d16f4ba 100644 --- a/src/model/styles.rs +++ b/src/model/styles.rs @@ -37,13 +37,6 @@ impl StyleMap { styles } - /// Create a style map from a single role. - pub fn with_role(role: Role) -> Self { - let mut styles = Self::new(); - styles.push(StyleEntry::Role(role)); - styles - } - /// Set an inner value for a style property. /// /// If the property needs folding and the value is already contained in the -- cgit v1.2.3