summaryrefslogtreecommitdiffstats
path: root/core/src/styles.rs
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2022-12-25 15:46:31 +0100
committerMinijackson <minijackson@riseup.net>2022-12-25 15:46:31 +0100
commit30f7d39ca2ed4590b5d356b1a4c024d11156a383 (patch)
tree115d8af6f02ec6d42e0a794ac57c391f3d10d6f7 /core/src/styles.rs
parent92a02c34628343153b33602eae00cef46e28d191 (diff)
downloaddiaphragm-30f7d39ca2ed4590b5d356b1a4c024d11156a383.tar.gz
diaphragm-30f7d39ca2ed4590b5d356b1a4c024d11156a383.zip
WIP before core rewrite
Diffstat (limited to 'core/src/styles.rs')
-rw-r--r--core/src/styles.rs7
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
11impl Pattern { 11impl 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 }