File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ use getopts::Options;
10
10
use crate :: builder:: { Builder , Kind } ;
11
11
use crate :: config:: { Config , TargetSelection } ;
12
12
use crate :: setup:: Profile ;
13
- use crate :: util:: t;
14
13
use crate :: { Build , DocTests } ;
15
14
16
15
#[ derive( Copy , Clone ) ]
@@ -544,7 +543,7 @@ Arguments:
544
543
Kind :: Bench | Kind :: Clean | Kind :: Dist | Kind :: Install => { }
545
544
} ;
546
545
// Get any optional paths which occur after the subcommand
547
- let mut paths = matches. free [ 1 ..] . iter ( ) . map ( |p| p. into ( ) ) . collect :: < Vec < PathBuf > > ( ) ;
546
+ let paths = matches. free [ 1 ..] . iter ( ) . map ( |p| p. into ( ) ) . collect :: < Vec < PathBuf > > ( ) ;
548
547
549
548
let verbose = matches. opt_present ( "verbose" ) ;
550
549
@@ -616,7 +615,7 @@ Arguments:
616
615
Subcommand :: Run { paths }
617
616
}
618
617
Kind :: Setup => {
619
- let profile = if paths. len ( ) > 1 {
618
+ if paths. len ( ) > 1 {
620
619
println ! ( "\n at most one profile can be passed to setup\n " ) ;
621
620
usage ( 1 , & opts, verbose, & subcommand_help)
622
621
} else if let Some ( path) = paths. pop ( ) {
Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ impl fmt::Display for Profile {
88
88
89
89
impl Step for Profile {
90
90
type Output = ( ) ;
91
+ const DEFAULT : bool = true ;
91
92
92
93
fn should_run ( mut run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
93
94
for choice in Profile :: all ( ) {
@@ -140,9 +141,7 @@ pub fn setup(config: &Config, profile: Profile) {
140
141
profile, VERSION
141
142
) ;
142
143
143
- if !config. dry_run {
144
- t ! ( fs:: write( path, settings) ) ;
145
- }
144
+ t ! ( fs:: write( path, settings) ) ;
146
145
147
146
let include_path = profile. include_path ( & config. src ) ;
148
147
println ! ( "`x.py` will now use the configuration at {}" , include_path. display( ) ) ;
You can’t perform that action at this time.
0 commit comments