Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
boozook committed Jun 9, 2024
1 parent 6e43f70 commit 34fac3e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 6 additions & 2 deletions cargo/src/assets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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);
Expand All @@ -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,
Expand Down
8 changes: 2 additions & 6 deletions cargo/src/assets/plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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()
Expand Down

0 comments on commit 34fac3e

Please sign in to comment.