@@ -19,14 +19,14 @@ pub fn verify() -> Result<(), ()> {
19
19
}
20
20
21
21
fn compile_only ( filename : & str ) -> Result < ( ) , ( ) > {
22
- let bar = ProgressBar :: new_spinner ( ) ;
23
- bar . set_message ( format ! ( "Compiling {}..." , filename) . as_str ( ) ) ;
24
- bar . enable_steady_tick ( 100 ) ;
22
+ let progress_bar = ProgressBar :: new_spinner ( ) ;
23
+ progress_bar . set_message ( format ! ( "Compiling {}..." , filename) . as_str ( ) ) ;
24
+ progress_bar . enable_steady_tick ( 100 ) ;
25
25
let compilecmd = Command :: new ( "rustc" )
26
26
. args ( & [ filename, "-o" , "temp" , "--color" , "always" ] )
27
27
. output ( )
28
28
. expect ( "fail" ) ;
29
- bar . finish_and_clear ( ) ;
29
+ progress_bar . finish_and_clear ( ) ;
30
30
if compilecmd. status . success ( ) {
31
31
let formatstr = format ! (
32
32
"{} Successfully compiled {}!" ,
@@ -50,17 +50,17 @@ fn compile_only(filename: &str) -> Result<(), ()> {
50
50
}
51
51
52
52
pub fn test ( filename : & str ) -> Result < ( ) , ( ) > {
53
- let bar = ProgressBar :: new_spinner ( ) ;
54
- bar . set_message ( format ! ( "Testing {}..." , filename) . as_str ( ) ) ;
55
- bar . enable_steady_tick ( 100 ) ;
53
+ let progress_bar = ProgressBar :: new_spinner ( ) ;
54
+ progress_bar . set_message ( format ! ( "Testing {}..." , filename) . as_str ( ) ) ;
55
+ progress_bar . enable_steady_tick ( 100 ) ;
56
56
let testcmd = Command :: new ( "rustc" )
57
57
. args ( & [ "--test" , filename, "-o" , "temp" , "--color" , "always" ] )
58
58
. output ( )
59
59
. expect ( "fail" ) ;
60
60
if testcmd. status . success ( ) {
61
- bar . set_message ( format ! ( "Running {}..." , filename) . as_str ( ) ) ;
61
+ progress_bar . set_message ( format ! ( "Running {}..." , filename) . as_str ( ) ) ;
62
62
let runcmd = Command :: new ( "./temp" ) . output ( ) . expect ( "fail" ) ;
63
- bar . finish_and_clear ( ) ;
63
+ progress_bar . finish_and_clear ( ) ;
64
64
65
65
if runcmd. status . success ( ) {
66
66
let formatstr = format ! ( "{} Successfully tested {}!" , Emoji ( "✅" , "✓" ) , filename) ;
@@ -79,7 +79,7 @@ pub fn test(filename: &str) -> Result<(), ()> {
79
79
Err ( ( ) )
80
80
}
81
81
} else {
82
- bar . finish_and_clear ( ) ;
82
+ progress_bar . finish_and_clear ( ) ;
83
83
let formatstr = format ! (
84
84
"{} Compiling of {} failed! Please try again. Here's the output:" ,
85
85
Emoji ( "⚠️ " , "!" ) ,
0 commit comments