File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -684,7 +684,9 @@ pub fn main() -> Result<utils::ExitCode> {
684
684
SetSubcmd :: DefaultHost { host_triple } => cfg
685
685
. set_default_host_triple ( host_triple)
686
686
. map ( |_| utils:: ExitCode ( 0 ) ) ,
687
- SetSubcmd :: Profile { profile_name } => set_profile ( cfg, & profile_name) ,
687
+ SetSubcmd :: Profile { profile_name } => {
688
+ cfg. set_profile ( & profile_name) . map ( |_| utils:: ExitCode ( 0 ) )
689
+ }
688
690
SetSubcmd :: AutoSelfUpdate {
689
691
auto_self_update_mode,
690
692
} => set_auto_self_update ( cfg, & auto_self_update_mode) ,
@@ -1490,11 +1492,6 @@ fn man(
1490
1492
Ok ( utils:: ExitCode ( 0 ) )
1491
1493
}
1492
1494
1493
- fn set_profile ( cfg : & mut Cfg , profile : & str ) -> Result < utils:: ExitCode > {
1494
- cfg. set_profile ( profile) ?;
1495
- Ok ( utils:: ExitCode ( 0 ) )
1496
- }
1497
-
1498
1495
fn set_auto_self_update ( cfg : & mut Cfg , auto_self_update_mode : & str ) -> Result < utils:: ExitCode > {
1499
1496
if self_update:: NEVER_SELF_UPDATE {
1500
1497
let mut args = process ( ) . args_os ( ) ;
Original file line number Diff line number Diff line change @@ -694,7 +694,7 @@ fn current_install_opts(opts: &InstallOpts<'_>) -> String {
694
694
" ,
695
695
opts. default_host_triple
696
696
. as_ref( )
697
- . map( |s| TargetTriple :: new( s ) )
697
+ . map( TargetTriple :: new)
698
698
. unwrap_or_else( TargetTriple :: from_host_or_build) ,
699
699
opts. default_toolchain
700
700
. as_ref( )
You can’t perform that action at this time.
0 commit comments