@@ -882,45 +882,45 @@ impl Destination {
882
882
match style {
883
883
Style :: FileNameStyle | Style :: LineAndColumn => { }
884
884
Style :: LineNumber => {
885
- try! ( self . start_attr ( term:: Attr :: Bold ) ) ;
885
+ self . start_attr ( term:: Attr :: Bold ) ? ;
886
886
if cfg ! ( windows) {
887
- try! ( self . start_attr ( term:: Attr :: ForegroundColor ( term:: color:: BRIGHT_CYAN ) ) ) ;
887
+ self . start_attr ( term:: Attr :: ForegroundColor ( term:: color:: BRIGHT_CYAN ) ) ? ;
888
888
} else {
889
- try! ( self . start_attr ( term:: Attr :: ForegroundColor ( term:: color:: BRIGHT_BLUE ) ) ) ;
889
+ self . start_attr ( term:: Attr :: ForegroundColor ( term:: color:: BRIGHT_BLUE ) ) ? ;
890
890
}
891
891
}
892
892
Style :: ErrorCode => {
893
- try! ( self . start_attr ( term:: Attr :: Bold ) ) ;
894
- try! ( self . start_attr ( term:: Attr :: ForegroundColor ( term:: color:: BRIGHT_MAGENTA ) ) ) ;
893
+ self . start_attr ( term:: Attr :: Bold ) ? ;
894
+ self . start_attr ( term:: Attr :: ForegroundColor ( term:: color:: BRIGHT_MAGENTA ) ) ? ;
895
895
}
896
896
Style :: Quotation => { }
897
897
Style :: OldSchoolNote => {
898
- try! ( self . start_attr ( term:: Attr :: Bold ) ) ;
899
- try! ( self . start_attr ( term:: Attr :: ForegroundColor ( term:: color:: BRIGHT_GREEN ) ) ) ;
898
+ self . start_attr ( term:: Attr :: Bold ) ? ;
899
+ self . start_attr ( term:: Attr :: ForegroundColor ( term:: color:: BRIGHT_GREEN ) ) ? ;
900
900
}
901
901
Style :: OldSchoolNoteText | Style :: HeaderMsg => {
902
- try! ( self . start_attr ( term:: Attr :: Bold ) ) ;
902
+ self . start_attr ( term:: Attr :: Bold ) ? ;
903
903
if cfg ! ( windows) {
904
- try! ( self . start_attr ( term:: Attr :: ForegroundColor ( term:: color:: BRIGHT_WHITE ) ) ) ;
904
+ self . start_attr ( term:: Attr :: ForegroundColor ( term:: color:: BRIGHT_WHITE ) ) ? ;
905
905
}
906
906
}
907
907
Style :: UnderlinePrimary | Style :: LabelPrimary => {
908
- try! ( self . start_attr ( term:: Attr :: Bold ) ) ;
909
- try! ( self . start_attr ( term:: Attr :: ForegroundColor ( lvl. color ( ) ) ) ) ;
908
+ self . start_attr ( term:: Attr :: Bold ) ? ;
909
+ self . start_attr ( term:: Attr :: ForegroundColor ( lvl. color ( ) ) ) ? ;
910
910
}
911
911
Style :: UnderlineSecondary |
912
912
Style :: LabelSecondary => {
913
- try! ( self . start_attr ( term:: Attr :: Bold ) ) ;
913
+ self . start_attr ( term:: Attr :: Bold ) ? ;
914
914
if cfg ! ( windows) {
915
- try! ( self . start_attr ( term:: Attr :: ForegroundColor ( term:: color:: BRIGHT_CYAN ) ) ) ;
915
+ self . start_attr ( term:: Attr :: ForegroundColor ( term:: color:: BRIGHT_CYAN ) ) ? ;
916
916
} else {
917
- try! ( self . start_attr ( term:: Attr :: ForegroundColor ( term:: color:: BRIGHT_BLUE ) ) ) ;
917
+ self . start_attr ( term:: Attr :: ForegroundColor ( term:: color:: BRIGHT_BLUE ) ) ? ;
918
918
}
919
919
}
920
920
Style :: NoStyle => { }
921
921
Style :: Level ( l) => {
922
- try! ( self . start_attr ( term:: Attr :: Bold ) ) ;
923
- try! ( self . start_attr ( term:: Attr :: ForegroundColor ( l. color ( ) ) ) ) ;
922
+ self . start_attr ( term:: Attr :: Bold ) ? ;
923
+ self . start_attr ( term:: Attr :: ForegroundColor ( l. color ( ) ) ) ? ;
924
924
}
925
925
}
926
926
Ok ( ( ) )
@@ -960,4 +960,4 @@ impl Write for Destination {
960
960
Raw ( ref mut w) => w. flush ( ) ,
961
961
}
962
962
}
963
- }
963
+ }
0 commit comments