@@ -618,10 +618,11 @@ fn print_graph(
618618
619619 if color {
620620 for cell in row {
621+ let chars = cell. char ( characters) ;
621622 if cell. character == SPACE {
622- write ! ( g_out, "{}" , cell . char ( characters ) )
623+ write ! ( g_out, "{}" , chars )
623624 } else {
624- write ! ( g_out, "{}" , Paint :: fixed( cell. color, cell . char ( characters ) ) )
625+ write ! ( g_out, "{}" , chars . to_string ( ) . fixed( cell. color) )
625626 }
626627 . unwrap ( ) ;
627628 }
@@ -682,7 +683,7 @@ pub fn format_branches(
682683 if let Some ( head) = head {
683684 if !head. is_branch {
684685 if color {
685- write ! ( branch_str, " {}" , Paint :: fixed( HEAD_COLOR , head_str ) )
686+ write ! ( branch_str, " {}" , head_str . fixed( HEAD_COLOR ) )
686687 } else {
687688 write ! ( branch_str, " {}" , head_str)
688689 }
@@ -708,7 +709,7 @@ pub fn format_branches(
708709 if let Some ( head) = head {
709710 if idx == 0 && head. is_branch {
710711 if color {
711- write ! ( branch_str, "{} " , Paint :: fixed( 14 , head_str ) )
712+ write ! ( branch_str, "{} " , head_str . fixed( 14 ) )
712713 } else {
713714 write ! ( branch_str, "{} " , head_str)
714715 }
@@ -717,7 +718,7 @@ pub fn format_branches(
717718 }
718719
719720 if color {
720- write ! ( branch_str, "{}" , Paint :: fixed ( branch_color , & branch. name) )
721+ write ! ( branch_str, "{}" , & branch. name. fixed ( branch_color ) )
721722 } else {
722723 write ! ( branch_str, "{}" , & branch. name)
723724 }
@@ -736,10 +737,11 @@ pub fn format_branches(
736737 let tag = & graph. all_branches [ * tag_index] ;
737738 let tag_color = curr_color. unwrap_or ( & tag. visual . term_color ) ;
738739
740+ let tag_name = & tag. name [ 5 ..] ;
739741 if color {
740- write ! ( branch_str, "{}" , Paint :: fixed( * tag_color, & tag . name [ 5 .. ] ) )
742+ write ! ( branch_str, "{}" , tag_name . fixed( * tag_color) )
741743 } else {
742- write ! ( branch_str, "{}" , & tag . name [ 5 .. ] )
744+ write ! ( branch_str, "{}" , tag_name )
743745 }
744746 . unwrap ( ) ;
745747
0 commit comments