From 7b58f9a26995d876b331a903eabce59d2935cfa3 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 9 Oct 2023 12:47:22 -0400 Subject: [PATCH] Adjust "Diffable" to exclude missing target objects --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/views/config.rs | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1aeec2d..26268a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2525,7 +2525,7 @@ dependencies = [ [[package]] name = "objdiff" -version = "0.5.1" +version = "0.5.2" dependencies = [ "anyhow", "byteorder", diff --git a/Cargo.toml b/Cargo.toml index 3a518af..c77910b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "objdiff" -version = "0.5.1" +version = "0.5.2" edition = "2021" rust-version = "1.70" authors = ["Luke Street "] diff --git a/src/views/config.rs b/src/views/config.rs index c4a1d91..3b6cbe9 100644 --- a/src/views/config.rs +++ b/src/views/config.rs @@ -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 {