Skip to content

Commit

Permalink
Bump cargo-manifest to 0.18
Browse files Browse the repository at this point in the history
  • Loading branch information
coolreader18 committed Jan 10, 2025
1 parent a228626 commit fe5e58a
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 18 deletions.
40 changes: 30 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ env_logger = "0.10"
globwalk = "0.8.0"
anyhow = "1.0.33"
pathdiff = "0.2.0"
cargo-manifest = "0.14"
cargo-manifest = "0.18"
fs-err = "2.5.0"
toml = { version = "0.8", features = ["preserve_order"] }
expect-test = "1.1.0"
Expand Down
11 changes: 4 additions & 7 deletions src/skeleton/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,11 @@ fn panic(_: &core::panic::PanicInfo) -> ! {
let parsed_manifest =
cargo_manifest::Manifest::from_slice(manifest.contents.as_bytes())?;

let is_harness = |products: &Option<Vec<Product>>, name: &str| -> bool {
let is_harness = |products: &[Product], name: &str| -> bool {
products
.as_ref()
.and_then(|v| {
v.iter()
.find(|product| product.name.as_deref() == Some(name))
.map(|p| p.harness)
})
.iter()
.find(|product| product.name.as_deref() == Some(name))
.map(|p| p.harness)
.unwrap_or(true)
};

Expand Down

0 comments on commit fe5e58a

Please # to comment.