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;
1010use crate :: builder:: { Builder , Kind } ;
1111use crate :: config:: { Config , TargetSelection } ;
1212use crate :: setup:: Profile ;
13- use crate :: util:: t;
1413use crate :: { Build , DocTests } ;
1514
1615#[ derive( Copy , Clone ) ]
@@ -544,7 +543,7 @@ Arguments:
544543 Kind :: Bench | Kind :: Clean | Kind :: Dist | Kind :: Install => { }
545544 } ;
546545 // 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 > > ( ) ;
548547
549548 let verbose = matches. opt_present ( "verbose" ) ;
550549
@@ -616,7 +615,7 @@ Arguments:
616615 Subcommand :: Run { paths }
617616 }
618617 Kind :: Setup => {
619- let profile = if paths. len ( ) > 1 {
618+ if paths. len ( ) > 1 {
620619 println ! ( "\n at most one profile can be passed to setup\n " ) ;
621620 usage ( 1 , & opts, verbose, & subcommand_help)
622621 } 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 {
8888
8989impl Step for Profile {
9090 type Output = ( ) ;
91+ const DEFAULT : bool = true ;
9192
9293 fn should_run ( mut run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
9394 for choice in Profile :: all ( ) {
@@ -140,9 +141,7 @@ pub fn setup(config: &Config, profile: Profile) {
140141 profile, VERSION
141142 ) ;
142143
143- if !config. dry_run {
144- t ! ( fs:: write( path, settings) ) ;
145- }
144+ t ! ( fs:: write( path, settings) ) ;
146145
147146 let include_path = profile. include_path ( & config. src ) ;
148147 println ! ( "`x.py` will now use the configuration at {}" , include_path. display( ) ) ;
You can’t perform that action at this time.
0 commit comments