diff --git a/src/cli/rustup_mode.rs b/src/cli/rustup_mode.rs index d80bc35e93..89fd348f23 100644 --- a/src/cli/rustup_mode.rs +++ b/src/cli/rustup_mode.rs @@ -1097,7 +1097,7 @@ async fn target_list( quiet: bool, ) -> Result { // downcasting required because the toolchain files can name any toolchain - let distributable = DistributableToolchain::from_partial(toolchain, cfg).await?; + let distributable = DistributableToolchain::from_partial(toolchain, cfg)?; common::list_items( distributable, |c| { @@ -1124,7 +1124,7 @@ async fn target_add( // isn't a feature yet. // list_components *and* add_component would both be inappropriate for // custom toolchains. - let distributable = DistributableToolchain::from_partial(toolchain, cfg).await?; + let distributable = DistributableToolchain::from_partial(toolchain, cfg)?; let components = distributable.components()?; if targets.contains(&"all".to_string()) { @@ -1168,7 +1168,7 @@ async fn target_remove( targets: Vec, toolchain: Option, ) -> Result { - let distributable = DistributableToolchain::from_partial(toolchain, cfg).await?; + let distributable = DistributableToolchain::from_partial(toolchain, cfg)?; for target in targets { let target = TargetTriple::new(target); @@ -1204,7 +1204,7 @@ async fn component_list( quiet: bool, ) -> Result { // downcasting required because the toolchain files can name any toolchain - let distributable = DistributableToolchain::from_partial(toolchain, cfg).await?; + let distributable = DistributableToolchain::from_partial(toolchain, cfg)?; common::list_items( distributable, |c| Some(&c.name), @@ -1220,7 +1220,7 @@ async fn component_add( toolchain: Option, target: Option, ) -> Result { - let distributable = DistributableToolchain::from_partial(toolchain, cfg).await?; + let distributable = DistributableToolchain::from_partial(toolchain, cfg)?; let target = get_target(target, &distributable); for component in &components { @@ -1246,7 +1246,7 @@ async fn component_remove( toolchain: Option, target: Option, ) -> Result { - let distributable = DistributableToolchain::from_partial(toolchain, cfg).await?; + let distributable = DistributableToolchain::from_partial(toolchain, cfg)?; let target = get_target(target, &distributable); for component in &components { @@ -1447,7 +1447,7 @@ async fn doc( mut topic: Option<&str>, doc_page: &DocPage, ) -> Result { - let toolchain = cfg.toolchain_from_partial(toolchain).await?; + let toolchain = cfg.toolchain_from_partial(toolchain)?; if let Ok(distributable) = DistributableToolchain::try_from(&toolchain) { if let [_] = distributable @@ -1508,7 +1508,7 @@ async fn man( command: &str, toolchain: Option, ) -> Result { - let toolchain = cfg.toolchain_from_partial(toolchain).await?; + let toolchain = cfg.toolchain_from_partial(toolchain)?; let path = toolchain.man_path(); utils::assert_is_directory(&path)?; diff --git a/src/config.rs b/src/config.rs index ac3f30adc7..52c26285fa 100644 --- a/src/config.rs +++ b/src/config.rs @@ -498,7 +498,7 @@ impl<'a> Cfg<'a> { .transpose()?) } - pub(crate) async fn toolchain_from_partial( + pub(crate) fn toolchain_from_partial( &self, toolchain: Option, ) -> anyhow::Result> { diff --git a/src/toolchain/distributable.rs b/src/toolchain/distributable.rs index 45cfa4da05..49a6cb6700 100644 --- a/src/toolchain/distributable.rs +++ b/src/toolchain/distributable.rs @@ -33,13 +33,11 @@ pub(crate) struct DistributableToolchain<'a> { } impl<'a> DistributableToolchain<'a> { - pub(crate) async fn from_partial( + pub(crate) fn from_partial( toolchain: Option, cfg: &'a Cfg<'a>, ) -> anyhow::Result { - Ok(Self::try_from( - &cfg.toolchain_from_partial(toolchain).await?, - )?) + Ok(Self::try_from(&cfg.toolchain_from_partial(toolchain)?)?) } pub(crate) fn new(cfg: &'a Cfg<'a>, desc: ToolchainDesc) -> Result {