@@ -69,23 +69,24 @@ pub enum StrokeKind {
69
69
Outside ,
70
70
}
71
71
72
- impl Default for StrokeKind {
73
- fn default ( ) -> Self {
74
- Self :: Middle
75
- }
76
- }
77
-
78
72
/// Describes the width and color of paths. The color can either be solid or provided by a callback. For more information, see [`ColorMode`]
79
73
///
80
74
/// The default stroke is the same as [`Stroke::NONE`].
81
- #[ derive( Clone , Debug , Default , PartialEq ) ]
75
+ #[ derive( Clone , Debug , PartialEq ) ]
82
76
#[ cfg_attr( feature = "serde" , derive( serde:: Deserialize , serde:: Serialize ) ) ]
83
77
pub struct PathStroke {
84
78
pub width : f32 ,
85
79
pub color : ColorMode ,
86
80
pub kind : StrokeKind ,
87
81
}
88
82
83
+ impl Default for PathStroke {
84
+ #[ inline]
85
+ fn default ( ) -> Self {
86
+ Self :: NONE
87
+ }
88
+ }
89
+
89
90
impl PathStroke {
90
91
/// Same as [`PathStroke::default`].
91
92
pub const NONE : Self = Self {
@@ -99,7 +100,7 @@ impl PathStroke {
99
100
Self {
100
101
width : width. into ( ) ,
101
102
color : ColorMode :: Solid ( color. into ( ) ) ,
102
- kind : StrokeKind :: default ( ) ,
103
+ kind : StrokeKind :: Middle ,
103
104
}
104
105
}
105
106
@@ -114,7 +115,7 @@ impl PathStroke {
114
115
Self {
115
116
width : width. into ( ) ,
116
117
color : ColorMode :: UV ( Arc :: new ( callback) ) ,
117
- kind : StrokeKind :: default ( ) ,
118
+ kind : StrokeKind :: Middle ,
118
119
}
119
120
}
120
121
@@ -168,7 +169,7 @@ impl From<Stroke> for PathStroke {
168
169
Self {
169
170
width : value. width ,
170
171
color : ColorMode :: Solid ( value. color ) ,
171
- kind : StrokeKind :: default ( ) ,
172
+ kind : StrokeKind :: Middle ,
172
173
}
173
174
}
174
175
}
0 commit comments