Skip to content

Commit b11f321

Browse files
committed
feat(config)!: remove implicit installation from toolchain_from_partial()
1 parent 28ba0c5 commit b11f321

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/config.rs

+5-7
Original file line numberDiff line numberDiff line change
@@ -502,16 +502,14 @@ impl<'a> Cfg<'a> {
502502
&self,
503503
toolchain: Option<PartialToolchainDesc>,
504504
) -> anyhow::Result<Toolchain<'_>> {
505-
match toolchain {
505+
let toolchain = match toolchain {
506506
Some(toolchain) => {
507507
let desc = toolchain.resolve(&self.get_default_host_triple()?)?;
508-
Ok(Toolchain::new(
509-
self,
510-
LocalToolchainName::Named(ToolchainName::Official(desc)),
511-
)?)
508+
Some(LocalToolchainName::Named(ToolchainName::Official(desc)))
512509
}
513-
None => Ok(self.find_or_install_active_toolchain(false).await?.0),
514-
}
510+
None => None,
511+
};
512+
self.local_toolchain(toolchain)
515513
}
516514

517515
pub(crate) fn find_active_toolchain(

0 commit comments

Comments
 (0)