Adjust "Diffable" to exclude missing target objects

This commit is contained in:
Luke Street 2023-10-09 12:47:22 -04:00
parent d9e7dacb6d
commit 7b58f9a269
3 changed files with 4 additions and 3 deletions

2
Cargo.lock generated
View File

@ -2525,7 +2525,7 @@ dependencies = [
[[package]]
name = "objdiff"
version = "0.5.1"
version = "0.5.2"
dependencies = [
"anyhow",
"byteorder",

View File

@ -1,6 +1,6 @@
[package]
name = "objdiff"
version = "0.5.1"
version = "0.5.2"
edition = "2021"
rust-version = "1.70"
authors = ["Luke Street <luke@street.dev>"]

View File

@ -438,7 +438,8 @@ fn filter_node(
match node {
ProjectObjectNode::File(name, object) => {
if (search.is_empty() || name.to_ascii_lowercase().contains(search))
&& (!filter_diffable || object.base_path.is_some())
&& (!filter_diffable
|| (object.base_path.is_some() && object.target_path.is_some()))
{
Some(node.clone())
} else {