diff --git a/Cargo.toml b/Cargo.toml index bb33360..aaafc4c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,8 +20,8 @@ path = "src/bin/main.rs" [dependencies] anyhow = { version = "1.0.70", optional = true } -clap = { version = "4.1.13", features = ["std", "derive", "usage", "help"], default_features = false, optional = true } -schemars = { version = "0.8.12", default_features = false } +clap = { version = "4.1.13", features = ["std", "derive", "usage", "help"], default-features = false, optional = true } +schemars = { version = "0.8.12", default-features = false } serde = "1.0.158" serde_json = "1.0.94" thiserror = "1.0.40" diff --git a/src/diff_walker.rs b/src/diff_walker.rs index f99c519..ca67eb3 100644 --- a/src/diff_walker.rs +++ b/src/diff_walker.rs @@ -117,7 +117,6 @@ impl DiffWalker { }, }), (Some(l), Some(r)) if l != r => { - if l.is_object() && r.is_object() {} (self.cb)(Change { path: json_path.to_owned(), change: ChangeKind::ConstRemove { removed: l.clone() }, @@ -556,7 +555,7 @@ impl JsonSchemaExt for SchemaObject { .any_of .as_ref() .filter(|schemas| schemas.len() == 1) - .and_then(|a| a.get(0)) + .and_then(|a| a.first()) .map(|subschema| subschema.clone().into_object().number().clone()) .unwrap_or_default() } else {