File tree 3 files changed +7
-16
lines changed
3 files changed +7
-16
lines changed Original file line number Diff line number Diff line change 1
- use std:: env;
2
1
use regex:: Regex ;
3
2
use serde:: Deserialize ;
3
+ use std:: env;
4
4
use std:: fmt:: { self , Display , Formatter } ;
5
5
use std:: fs:: { self , remove_file, File } ;
6
6
use std:: io:: Read ;
@@ -132,8 +132,7 @@ path = "{}.rs""#,
132
132
} else {
133
133
"Failed to write 📎 Clippy 📎 Cargo.toml file."
134
134
} ;
135
- fs:: write ( CLIPPY_CARGO_TOML_PATH , cargo_toml)
136
- . expect ( cargo_toml_error_msg) ;
135
+ fs:: write ( CLIPPY_CARGO_TOML_PATH , cargo_toml) . expect ( cargo_toml_error_msg) ;
137
136
// To support the ability to run the clipy exercises, build
138
137
// an executable, in addition to running clippy. With a
139
138
// compilation failure, this would silently fail. But we expect
Original file line number Diff line number Diff line change 1
1
macro_rules! warn {
2
2
( $fmt: literal, $ex: expr) => { {
3
- use std:: env;
4
3
use console:: { style, Emoji } ;
4
+ use std:: env;
5
5
let formatstr = format!( $fmt, $ex) ;
6
6
if env:: var( "NO_EMOJI" ) . is_ok( ) {
7
- println!(
8
- "{} {}" ,
9
- style( "!" ) . red( ) ,
10
- style( formatstr) . red( )
11
- ) ;
7
+ println!( "{} {}" , style( "!" ) . red( ) , style( formatstr) . red( ) ) ;
12
8
} else {
13
9
println!(
14
10
"{} {}" ,
@@ -21,15 +17,11 @@ macro_rules! warn {
21
17
22
18
macro_rules! success {
23
19
( $fmt: literal, $ex: expr) => { {
24
- use std:: env;
25
20
use console:: { style, Emoji } ;
21
+ use std:: env;
26
22
let formatstr = format!( $fmt, $ex) ;
27
23
if env:: var( "NO_EMOJI" ) . is_ok( ) {
28
- println!(
29
- "{} {}" ,
30
- style( "✓" ) . green( ) ,
31
- style( formatstr) . green( )
32
- ) ;
24
+ println!( "{} {}" , style( "✓" ) . green( ) , style( formatstr) . green( ) ) ;
33
25
} else {
34
26
println!(
35
27
"{} {}" ,
Original file line number Diff line number Diff line change 1
- use std:: env;
2
1
use crate :: exercise:: { CompiledExercise , Exercise , Mode , State } ;
3
2
use console:: style;
4
3
use indicatif:: ProgressBar ;
4
+ use std:: env;
5
5
6
6
// Verify that the provided container of Exercise objects
7
7
// can be compiled and run without any failures.
You can’t perform that action at this time.
0 commit comments