@@ -23,12 +23,12 @@ use embedded_graphics::{
2323
2424impl < C > ChangeTextStyle < C >
2525where
26- C : PixelColor + Default ,
26+ C : PixelColor ,
2727{
2828 pub ( crate ) fn apply < S : CharacterStyle < Color = C > > ( self , text_renderer : & mut S ) {
2929 match self {
3030 ChangeTextStyle :: Reset => {
31- text_renderer. set_text_color ( Some ( C :: default ( ) ) ) ;
31+ text_renderer. set_text_color ( None ) ;
3232 text_renderer. set_background_color ( None ) ;
3333 text_renderer. set_underline_color ( DecorationColor :: None ) ;
3434 text_renderer. set_strikethrough_color ( DecorationColor :: None ) ;
9696 F : CharacterStyle + TextRenderer ,
9797 D : DrawTarget < Color = <F as TextRenderer >:: Color > ,
9898 M : Plugin < ' a , <F as TextRenderer >:: Color > ,
99- <F as CharacterStyle >:: Color : Default ,
10099{
101100 type Error = D :: Error ;
102101 type Color = <F as CharacterStyle >:: Color ;
@@ -147,7 +146,6 @@ impl<'a, 'b, 'c, F, M> StyledLineRenderer<'a, 'b, 'c, F, M>
147146where
148147 F : TextRenderer < Color = <F as CharacterStyle >:: Color > + CharacterStyle ,
149148 M : Plugin < ' a , <F as TextRenderer >:: Color > + Plugin < ' a , <F as CharacterStyle >:: Color > ,
150- <F as CharacterStyle >:: Color : Default ,
151149{
152150 #[ inline]
153151 pub ( crate ) fn draw < D > ( mut self , display : & mut D ) -> Result < ( ) , D :: Error >
@@ -234,7 +232,7 @@ mod test {
234232 pattern : & [ & str ] ,
235233 ) where
236234 S : TextRenderer < Color = <S as CharacterStyle >:: Color > + CharacterStyle ,
237- <S as CharacterStyle >:: Color : embedded_graphics:: mock_display:: ColorMapping + Default ,
235+ <S as CharacterStyle >:: Color : embedded_graphics:: mock_display:: ColorMapping ,
238236 {
239237 let parser = Parser :: parse ( text) ;
240238 let cursor = LineCursor :: new (
0 commit comments