@@ -20,7 +20,7 @@ pub(crate) struct PrettyFormatter<T> {
2020}
2121
2222impl < T : Write > PrettyFormatter < T > {
23- pub fn new (
23+ pub ( crate ) fn new (
2424 out : OutputLocation < T > ,
2525 use_color : bool ,
2626 max_name_len : usize ,
@@ -31,43 +31,43 @@ impl<T: Write> PrettyFormatter<T> {
3131 }
3232
3333 #[ cfg( test) ]
34- pub fn output_location ( & self ) -> & OutputLocation < T > {
34+ pub ( crate ) fn output_location ( & self ) -> & OutputLocation < T > {
3535 & self . out
3636 }
3737
38- pub fn write_ok ( & mut self ) -> io:: Result < ( ) > {
38+ pub ( crate ) fn write_ok ( & mut self ) -> io:: Result < ( ) > {
3939 self . write_short_result ( "ok" , term:: color:: GREEN )
4040 }
4141
42- pub fn write_failed ( & mut self ) -> io:: Result < ( ) > {
42+ pub ( crate ) fn write_failed ( & mut self ) -> io:: Result < ( ) > {
4343 self . write_short_result ( "FAILED" , term:: color:: RED )
4444 }
4545
46- pub fn write_ignored ( & mut self , message : Option < & ' static str > ) -> io:: Result < ( ) > {
46+ pub ( crate ) fn write_ignored ( & mut self , message : Option < & ' static str > ) -> io:: Result < ( ) > {
4747 if let Some ( message) = message {
4848 self . write_short_result ( & format ! ( "ignored, {message}" ) , term:: color:: YELLOW )
4949 } else {
5050 self . write_short_result ( "ignored" , term:: color:: YELLOW )
5151 }
5252 }
5353
54- pub fn write_time_failed ( & mut self ) -> io:: Result < ( ) > {
54+ pub ( crate ) fn write_time_failed ( & mut self ) -> io:: Result < ( ) > {
5555 self . write_short_result ( "FAILED (time limit exceeded)" , term:: color:: RED )
5656 }
5757
58- pub fn write_bench ( & mut self ) -> io:: Result < ( ) > {
58+ pub ( crate ) fn write_bench ( & mut self ) -> io:: Result < ( ) > {
5959 self . write_pretty ( "bench" , term:: color:: CYAN )
6060 }
6161
62- pub fn write_short_result (
62+ pub ( crate ) fn write_short_result (
6363 & mut self ,
6464 result : & str ,
6565 color : term:: color:: Color ,
6666 ) -> io:: Result < ( ) > {
6767 self . write_pretty ( result, color)
6868 }
6969
70- pub fn write_pretty ( & mut self , word : & str , color : term:: color:: Color ) -> io:: Result < ( ) > {
70+ pub ( crate ) fn write_pretty ( & mut self , word : & str , color : term:: color:: Color ) -> io:: Result < ( ) > {
7171 match self . out {
7272 OutputLocation :: Pretty ( ref mut term) => {
7373 if self . use_color {
@@ -86,7 +86,7 @@ impl<T: Write> PrettyFormatter<T> {
8686 }
8787 }
8888
89- pub fn write_plain < S : AsRef < str > > ( & mut self , s : S ) -> io:: Result < ( ) > {
89+ pub ( crate ) fn write_plain < S : AsRef < str > > ( & mut self , s : S ) -> io:: Result < ( ) > {
9090 let s = s. as_ref ( ) ;
9191 self . out . write_all ( s. as_bytes ( ) ) ?;
9292 self . out . flush ( )
@@ -154,15 +154,15 @@ impl<T: Write> PrettyFormatter<T> {
154154 Ok ( ( ) )
155155 }
156156
157- pub fn write_successes ( & mut self , state : & ConsoleTestState ) -> io:: Result < ( ) > {
157+ pub ( crate ) fn write_successes ( & mut self , state : & ConsoleTestState ) -> io:: Result < ( ) > {
158158 self . write_results ( & state. not_failures , "successes" )
159159 }
160160
161- pub fn write_failures ( & mut self , state : & ConsoleTestState ) -> io:: Result < ( ) > {
161+ pub ( crate ) fn write_failures ( & mut self , state : & ConsoleTestState ) -> io:: Result < ( ) > {
162162 self . write_results ( & state. failures , "failures" )
163163 }
164164
165- pub fn write_time_failures ( & mut self , state : & ConsoleTestState ) -> io:: Result < ( ) > {
165+ pub ( crate ) fn write_time_failures ( & mut self , state : & ConsoleTestState ) -> io:: Result < ( ) > {
166166 self . write_results ( & state. time_failures , "failures (time limit exceeded)" )
167167 }
168168
0 commit comments