@@ -20,7 +20,7 @@ use super::types::{NamePadding, TestDesc, TestDescAndFn};
20
20
use super :: { filter_tests, run_tests, term} ;
21
21
22
22
/// Generic wrapper over stdout.
23
- pub enum OutputLocation < T > {
23
+ pub ( crate ) enum OutputLocation < T > {
24
24
Pretty ( Box < term:: StdoutTerminal > ) ,
25
25
Raw ( T ) ,
26
26
}
@@ -41,15 +41,15 @@ impl<T: Write> Write for OutputLocation<T> {
41
41
}
42
42
}
43
43
44
- pub struct ConsoleTestDiscoveryState {
44
+ pub ( crate ) struct ConsoleTestDiscoveryState {
45
45
pub log_out : Option < File > ,
46
46
pub tests : usize ,
47
47
pub benchmarks : usize ,
48
48
pub ignored : usize ,
49
49
}
50
50
51
51
impl ConsoleTestDiscoveryState {
52
- pub fn new ( opts : & TestOpts ) -> io:: Result < ConsoleTestDiscoveryState > {
52
+ pub ( crate ) fn new ( opts : & TestOpts ) -> io:: Result < ConsoleTestDiscoveryState > {
53
53
let log_out = match opts. logfile {
54
54
Some ( ref path) => Some ( File :: create ( path) ?) ,
55
55
None => None ,
@@ -58,7 +58,7 @@ impl ConsoleTestDiscoveryState {
58
58
Ok ( ConsoleTestDiscoveryState { log_out, tests : 0 , benchmarks : 0 , ignored : 0 } )
59
59
}
60
60
61
- pub fn write_log < F , S > ( & mut self , msg : F ) -> io:: Result < ( ) >
61
+ pub ( crate ) fn write_log < F , S > ( & mut self , msg : F ) -> io:: Result < ( ) >
62
62
where
63
63
S : AsRef < str > ,
64
64
F : FnOnce ( ) -> S ,
@@ -74,7 +74,7 @@ impl ConsoleTestDiscoveryState {
74
74
}
75
75
}
76
76
77
- pub struct ConsoleTestState {
77
+ pub ( crate ) struct ConsoleTestState {
78
78
pub log_out : Option < File > ,
79
79
pub total : usize ,
80
80
pub passed : usize ,
@@ -92,7 +92,7 @@ pub struct ConsoleTestState {
92
92
}
93
93
94
94
impl ConsoleTestState {
95
- pub fn new ( opts : & TestOpts ) -> io:: Result < ConsoleTestState > {
95
+ pub ( crate ) fn new ( opts : & TestOpts ) -> io:: Result < ConsoleTestState > {
96
96
let log_out = match opts. logfile {
97
97
Some ( ref path) => Some ( File :: create ( path) ?) ,
98
98
None => None ,
@@ -116,7 +116,7 @@ impl ConsoleTestState {
116
116
} )
117
117
}
118
118
119
- pub fn write_log < F , S > ( & mut self , msg : F ) -> io:: Result < ( ) >
119
+ pub ( crate ) fn write_log < F , S > ( & mut self , msg : F ) -> io:: Result < ( ) >
120
120
where
121
121
S : AsRef < str > ,
122
122
F : FnOnce ( ) -> S ,
@@ -131,7 +131,7 @@ impl ConsoleTestState {
131
131
}
132
132
}
133
133
134
- pub fn write_log_result (
134
+ pub ( crate ) fn write_log_result (
135
135
& mut self ,
136
136
test : & TestDesc ,
137
137
result : & TestResult ,
@@ -170,7 +170,7 @@ impl ConsoleTestState {
170
170
}
171
171
172
172
// List the tests to console, and optionally to logfile. Filters are honored.
173
- pub fn list_tests_console ( opts : & TestOpts , tests : Vec < TestDescAndFn > ) -> io:: Result < ( ) > {
173
+ pub ( crate ) fn list_tests_console ( opts : & TestOpts , tests : Vec < TestDescAndFn > ) -> io:: Result < ( ) > {
174
174
let output = match term:: stdout ( ) {
175
175
None => OutputLocation :: Raw ( io:: stdout ( ) . lock ( ) ) ,
176
176
Some ( t) => OutputLocation :: Pretty ( t) ,
0 commit comments