Skip to content

Commit ffa3e7c

Browse files
committed
fmt
1 parent c650c58 commit ffa3e7c

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/cli/rustup_mode.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -742,9 +742,9 @@ pub async fn main(
742742
SelfSubcmd::UpgradeData => cfg.upgrade_data().map(|_| ExitCode(0)),
743743
},
744744
RustupSubcmd::Set { subcmd } => match subcmd {
745-
SetSubcmd::DefaultHost { host_tuple } => cfg
746-
.set_default_host_tuple(host_tuple)
747-
.map(|_| ExitCode(0)),
745+
SetSubcmd::DefaultHost { host_tuple } => {
746+
cfg.set_default_host_tuple(host_tuple).map(|_| ExitCode(0))
747+
}
748748
SetSubcmd::Profile { profile_name } => {
749749
cfg.set_profile(profile_name).map(|_| ExitCode(0))
750750
}

src/config.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,7 @@ impl<'a> Cfg<'a> {
289289
let download_dir = rustup_dir.join("downloads");
290290

291291
// Figure out get_default_host_tuple before Config is populated
292-
let default_host_tuple =
293-
settings_file.with(|s| Ok(get_default_host_tuple(s, process)))?;
292+
let default_host_tuple = settings_file.with(|s| Ok(get_default_host_tuple(s, process)))?;
294293
// Environment override
295294
let env_override = match process.var_opt("RUSTUP_TOOLCHAIN")? {
296295
Some(tc) => {
@@ -900,8 +899,7 @@ impl<'a> Cfg<'a> {
900899
// Ensure that the provided host_tuple is capable of resolving
901900
// against the 'stable' toolchain. This provides early errors
902901
// if the supplied tuple is insufficient / bad.
903-
PartialToolchainDesc::from_str("stable")?
904-
.resolve(&TargetTuple::new(host_tuple.clone()))?;
902+
PartialToolchainDesc::from_str("stable")?.resolve(&TargetTuple::new(host_tuple.clone()))?;
905903
self.settings_file.with_mut(|s| {
906904
s.default_host_tuple = Some(host_tuple);
907905
Ok(())

0 commit comments

Comments
 (0)