@@ -92,7 +92,7 @@ impl<'a, 'b> DrawingBackend for ConrodBackend<'a, 'b> {
9292 style : & S ,
9393 ) -> Result < ( ) , DrawingErrorKind < Self :: ErrorType > > {
9494 // Acquire absolute position generator (in parent container)
95- if let Some ( position) = position:: PositionParent :: from ( & self . ui , self . parent ) {
95+ if let Some ( position) = position:: PositionParent :: from ( self . ui , self . parent ) {
9696 // Generate line style
9797 let line_style = conrod:: widget:: primitive:: line:: Style :: solid ( )
9898 . color ( color:: Color :: from ( & style. color ( ) ) . into ( ) )
@@ -159,7 +159,7 @@ impl<'a, 'b> DrawingBackend for ConrodBackend<'a, 'b> {
159159 style : & S ,
160160 ) -> Result < ( ) , DrawingErrorKind < Self :: ErrorType > > {
161161 // Acquire absolute position generator (in parent container)
162- if let Some ( position) = position:: PositionParent :: from ( & self . ui , self . parent ) {
162+ if let Some ( position) = position:: PositionParent :: from ( self . ui , self . parent ) {
163163 // Generate line style
164164 let line_style = conrod:: widget:: primitive:: line:: Style :: solid ( )
165165 . color ( color:: Color :: from ( & style. color ( ) ) . into ( ) )
@@ -221,7 +221,7 @@ impl<'a, 'b> DrawingBackend for ConrodBackend<'a, 'b> {
221221 style : & S ,
222222 ) -> Result < ( ) , DrawingErrorKind < Self :: ErrorType > > {
223223 // Acquire absolute position generator (in parent container)
224- if let Some ( position) = position:: PositionParent :: from ( & self . ui , self . parent ) {
224+ if let Some ( position) = position:: PositionParent :: from ( self . ui , self . parent ) {
225225 // Paint a simplified path, where empty areas are removed and un-necessary points are \
226226 // cleared. This is required for triangulation to work properly, and it reduces \
227227 // the number of triangles on screen to a strict minimum.
@@ -278,17 +278,17 @@ impl<'a, 'b> DrawingBackend for ConrodBackend<'a, 'b> {
278278 let ( text_width_estimated, font_size_final) = convert:: font_style ( text, style. size ( ) ) ;
279279
280280 // Generate text style
281- let mut text_style = conrod:: widget:: primitive:: text:: Style :: default ( ) ;
282-
283- text_style . color = Some ( color :: Color :: from ( & style . color ( ) ) . into ( ) ) ;
284- text_style . font_id = Some ( Some ( self . font ) ) ;
285- text_style . font_size = Some ( font_size_final ) ;
286-
287- text_style . justify = Some ( match style . anchor ( ) . h_pos {
288- text_anchor:: HPos :: Left => conrod:: text:: Justify :: Left ,
289- text_anchor :: HPos :: Right => conrod :: text :: Justify :: Right ,
290- text_anchor :: HPos :: Center => conrod :: text :: Justify :: Center ,
291- } ) ;
281+ let text_style = conrod:: widget:: primitive:: text:: Style {
282+ font_size : Some ( font_size_final ) ,
283+ font_id : Some ( Some ( self . font ) ) ,
284+ color : Some ( color :: Color :: from ( & style . color ( ) ) . into ( ) ) ,
285+ justify : Some ( match style . anchor ( ) . h_pos {
286+ text_anchor :: HPos :: Left => conrod :: text :: Justify :: Left ,
287+ text_anchor :: HPos :: Right => conrod :: text :: Justify :: Right ,
288+ text_anchor:: HPos :: Center => conrod:: text:: Justify :: Center ,
289+ } ) ,
290+ ..std :: default :: Default :: default ( )
291+ } ;
292292
293293 // Render text widget
294294 conrod:: widget:: Text :: new ( text)
0 commit comments