diff options
Diffstat (limited to 'core/src/styles.rs')
-rw-r--r-- | core/src/styles.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/src/styles.rs b/core/src/styles.rs index c061c58..73373ba 100644 --- a/core/src/styles.rs +++ b/core/src/styles.rs | |||
@@ -10,10 +10,7 @@ pub enum Pattern { | |||
10 | 10 | ||
11 | impl Pattern { | 11 | impl Pattern { |
12 | pub fn is_none(&self) -> bool { | 12 | pub fn is_none(&self) -> bool { |
13 | match self { | 13 | matches!(self, Pattern::None) |
14 | Pattern::None => true, | ||
15 | _ => false, | ||
16 | } | ||
17 | } | 14 | } |
18 | } | 15 | } |
19 | 16 | ||
@@ -97,7 +94,7 @@ impl StrokeStyleBuilder { | |||
97 | 94 | ||
98 | pub fn build(&mut self) -> StrokeStyle { | 95 | pub fn build(&mut self) -> StrokeStyle { |
99 | StrokeStyle { | 96 | StrokeStyle { |
100 | pattern: self.pattern.clone().unwrap_or_default(), | 97 | pattern: self.pattern.unwrap_or_default(), |
101 | dash: self.dash.clone(), | 98 | dash: self.dash.clone(), |
102 | line_width: self.line_width.unwrap_or(Float::Fixed(2.)), | 99 | line_width: self.line_width.unwrap_or(Float::Fixed(2.)), |
103 | } | 100 | } |