@@ -3,7 +3,7 @@ use std::fmt::{self, Display, Formatter};
3
3
use std:: fs:: { self , remove_file, File } ;
4
4
use std:: io:: { self , BufRead , BufReader } ;
5
5
use std:: path:: PathBuf ;
6
- use std:: process:: { self , exit, Command } ;
6
+ use std:: process:: { self , exit, Command , Stdio } ;
7
7
use std:: { array, env, mem} ;
8
8
use winnow:: ascii:: { space0, Caseless } ;
9
9
use winnow:: combinator:: opt;
@@ -72,7 +72,7 @@ pub struct Exercise {
72
72
73
73
// An enum to track of the state of an Exercise.
74
74
// An Exercise can be either Done or Pending
75
- #[ derive( PartialEq , Debug ) ]
75
+ #[ derive( PartialEq , Eq , Debug ) ]
76
76
pub enum State {
77
77
// The state of the exercise once it's been completed
78
78
Done ,
@@ -81,7 +81,7 @@ pub enum State {
81
81
}
82
82
83
83
// The context information of a pending exercise
84
- #[ derive( PartialEq , Debug ) ]
84
+ #[ derive( PartialEq , Eq , Debug ) ]
85
85
pub struct ContextLine {
86
86
// The source code that is still pending completion
87
87
pub line : String ,
@@ -162,7 +162,10 @@ path = "{}.rs""#,
162
162
. args ( RUSTC_COLOR_ARGS )
163
163
. args ( RUSTC_EDITION_ARGS )
164
164
. args ( RUSTC_NO_DEBUG_ARGS )
165
- . output ( )
165
+ . stdin ( Stdio :: null ( ) )
166
+ . stdout ( Stdio :: null ( ) )
167
+ . stderr ( Stdio :: null ( ) )
168
+ . status ( )
166
169
. expect ( "Failed to compile!" ) ;
167
170
// Due to an issue with Clippy, a cargo clean is required to catch all lints.
168
171
// See https://github.com/rust-lang/rust-clippy/issues/2604
@@ -171,7 +174,10 @@ path = "{}.rs""#,
171
174
Command :: new ( "cargo" )
172
175
. args ( [ "clean" , "--manifest-path" , CLIPPY_CARGO_TOML_PATH ] )
173
176
. args ( RUSTC_COLOR_ARGS )
174
- . output ( )
177
+ . stdin ( Stdio :: null ( ) )
178
+ . stdout ( Stdio :: null ( ) )
179
+ . stderr ( Stdio :: null ( ) )
180
+ . status ( )
175
181
. expect ( "Failed to run 'cargo clean'" ) ;
176
182
Command :: new ( "cargo" )
177
183
. args ( [ "clippy" , "--manifest-path" , CLIPPY_CARGO_TOML_PATH ] )
0 commit comments