From 74dadc1f4d5f2870163842bb1fa8012958357808 Mon Sep 17 00:00:00 2001 From: Christopher Regali Date: Sat, 28 Oct 2023 22:49:21 +0200 Subject: [PATCH 1/2] Update json-diff library with array support, bump version for release drafting. --- Cargo.toml | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 61f93d5..b3d1af9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ description = "A flexible rule-based file and folder comparison tool and crate i repository = "https://github.com/VolumeGraphics/havocompare" homepage = "https://github.com/VolumeGraphics/havocompare" documentation = "https://docs.rs/havocompare" -version = "0.5.0-RC2" +version = "0.5.0" edition = "2021" license = "MIT" authors = ["Volume Graphics GmbH"] @@ -47,7 +47,7 @@ tempfile = "3.8" fs_extra = "1.3" opener = "0.6" anyhow = "1.0" -json_diff_ng = {version = "0.3.0-rc1"} +json_diff_ng = {version = "0.3.0"} [dev-dependencies] diff --git a/README.md b/README.md index bff776f..7e780cb 100644 --- a/README.md +++ b/README.md @@ -247,7 +247,7 @@ rules: ## Changelog ### 0.5.0 -- Add basic JSON checking +- Add JSON checking ### 0.4.0 - Separate reporting logic from comparison logic From 96bcd7f7a8593010201b004b3041245420c85d60 Mon Sep 17 00:00:00 2001 From: Alexander Rohde Date: Sun, 29 Oct 2023 12:02:19 +0100 Subject: [PATCH 2/2] fix clippy lints --- src/csv/tokenizer/mod.rs | 2 +- src/json.rs | 2 +- src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/csv/tokenizer/mod.rs b/src/csv/tokenizer/mod.rs index 82ae61b..ee8c1f4 100644 --- a/src/csv/tokenizer/mod.rs +++ b/src/csv/tokenizer/mod.rs @@ -66,7 +66,7 @@ impl SpecialCharacter { impl PartialOrd for SpecialCharacter { fn partial_cmp(&self, other: &Self) -> Option { - self.get_position().partial_cmp(&other.get_position()) + Some(self.cmp(other)) } } diff --git a/src/json.rs b/src/json.rs index 45227f5..f5aee0b 100644 --- a/src/json.rs +++ b/src/json.rs @@ -106,7 +106,7 @@ mod test { use super::*; fn trim_split(list: &str) -> Vec<&str> { - list.split("\n").map(|e| e.trim()).collect() + list.split('\n').map(|e| e.trim()).collect() } #[test] diff --git a/src/lib.rs b/src/lib.rs index 4a317d7..57db3b1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -281,7 +281,7 @@ fn process_rule( let mut all_okay = true; nominal_cleaned_paths .into_iter() - .zip(actual_cleaned_paths.into_iter()) + .zip(actual_cleaned_paths) .for_each(|(n, a)| { let compare_result = process_file(n, a, rule); all_okay &= !compare_result.is_error;