From 34fac3e5fcd5c477ca03a38af1fffb812d3a6554 Mon Sep 17 00:00:00 2001 From: Alexander Koz Date: Sun, 9 Jun 2024 11:25:57 +0400 Subject: [PATCH] fmt --- cargo/src/assets/mod.rs | 8 ++++++-- cargo/src/assets/plan.rs | 8 ++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cargo/src/assets/mod.rs b/cargo/src/assets/mod.rs index 428f6ebb..823b8d76 100644 --- a/cargo/src/assets/mod.rs +++ b/cargo/src/assets/mod.rs @@ -162,6 +162,12 @@ pub mod proto { // kind of assets just for log: let kind_prefix = key.dev.then_some("dev-").unwrap_or_default(); + // this one for assets: + let kind = if key.dev { + AssetKind::Dev + } else { + AssetKind::Package + }; // build if needed: @@ -266,7 +272,6 @@ pub mod proto { let msg = format!("{kind_prefix}assets pre-build for {}, {REASON}.", key.id); cfg.log().status("Skip", msg); } else { - let kind = if key.dev { AssetKind::Dev } else { AssetKind::Package }; match pdc::build(cfg, &key.id, locked.as_inner(), kind) { Ok(_) => { let msg = format!("{kind_prefix}assets for {}", key.id); @@ -289,7 +294,6 @@ pub mod proto { locked.unlock(); - let kind = if key.dev { AssetKind::Dev } else { AssetKind::Package }; let art_index = artifacts.artifacts.len(); artifacts.artifacts.push(AssetsArtifact { kind, package_id: key.id, diff --git a/cargo/src/assets/plan.rs b/cargo/src/assets/plan.rs index 30a46f23..9388fcee 100644 --- a/cargo/src/assets/plan.rs +++ b/cargo/src/assets/plan.rs @@ -126,10 +126,7 @@ pub mod proto { impl From<&'_ RootNode<'_>> for MultiKey { fn from(root: &'_ RootNode<'_>) -> Self { Self { dev: root.node().target().is_dev(), - id: root.deps() - .iter() - .map(|d| d.package_id().to_owned()) - .collect() } + id: root.deps().iter().map(|d| d.package_id().to_owned()).collect() } } } impl MultiKey { @@ -154,8 +151,7 @@ pub mod proto { // prepare env: let global_env: BTreeMap<_, _> = - std::env::vars() - .chain({ + std::env::vars().chain({ cfg.sdk() .map(|sdk| sdk.path()) .ok()