@@ -134,7 +134,10 @@ where
134134 . set ( "cx" , x_pos)
135135 . set ( "cy" , y_pos)
136136 . set ( "r" , radius)
137- . set ( "fill" , style. get_colour ( ) . clone ( ) . unwrap_or ( "" . into ( ) ) ) ,
137+ . set (
138+ "fill" ,
139+ style. get_colour ( ) . clone ( ) . unwrap_or_else ( || "" . into ( ) ) ,
140+ ) ,
138141 ) ;
139142 }
140143 style:: Marker :: Square => {
@@ -144,7 +147,10 @@ where
144147 . set ( "y" , y_pos - radius)
145148 . set ( "width" , 2. * radius)
146149 . set ( "height" , 2. * radius)
147- . set ( "fill" , style. get_colour ( ) . clone ( ) . unwrap_or ( "" . into ( ) ) ) ,
150+ . set (
151+ "fill" ,
152+ style. get_colour ( ) . clone ( ) . unwrap_or_else ( || "" . into ( ) ) ,
153+ ) ,
148154 ) ;
149155 }
150156 style:: Marker :: Cross => {
@@ -157,7 +163,10 @@ where
157163 group. append (
158164 node:: element:: Path :: new ( )
159165 . set ( "fill" , "none" )
160- . set ( "stroke" , style. get_colour ( ) . clone ( ) . unwrap_or ( "" . into ( ) ) )
166+ . set (
167+ "stroke" ,
168+ style. get_colour ( ) . clone ( ) . unwrap_or_else ( || "" . into ( ) ) ,
169+ )
161170 . set ( "stroke-width" , 2 )
162171 . set ( "d" , path) ,
163172 ) ;
@@ -193,7 +202,10 @@ where
193202 . set ( "height" , count_scaled)
194203 . set (
195204 "fill" ,
196- style. get_fill ( ) . clone ( ) . unwrap_or ( "burlywood" . into ( ) ) ,
205+ style
206+ . get_fill ( )
207+ . clone ( )
208+ . unwrap_or_else ( || "burlywood" . into ( ) ) ,
197209 )
198210 . set ( "stroke" , "black" ) ;
199211 group. append ( rect) ;
@@ -237,7 +249,10 @@ where
237249 group. append (
238250 node:: element:: Path :: new ( )
239251 . set ( "fill" , "none" )
240- . set ( "stroke" , style. get_colour ( ) . clone ( ) . unwrap_or ( "" . into ( ) ) )
252+ . set (
253+ "stroke" ,
254+ style. get_colour ( ) . clone ( ) . unwrap_or_else ( || "" . into ( ) ) ,
255+ )
241256 . set ( "stroke-width" , style. get_width ( ) . clone ( ) . unwrap_or ( 2. ) )
242257 . set ( "d" , path) ,
243258 ) ;
0 commit comments