From 6d4db60688ff14a28eba97553eba0c38d1166464 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Tue, 10 Oct 2023 16:33:17 -0400 Subject: [PATCH] Support ("") as being equal to None in compare_property_list_of_ast_nodes. --- src/compare/compare_field.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/compare/compare_field.rs b/src/compare/compare_field.rs index e6496fb1..030da716 100644 --- a/src/compare/compare_field.rs +++ b/src/compare/compare_field.rs @@ -353,6 +353,15 @@ where let rust_value: Option> = rust_value.map(|it| it.collect()); match (value, rust_value) { (None, None) => {} + (Some(el), None) + if el.len() == 1 + && el.into_iter().all(|t| { + if let Ok(r#""""#) = t.as_atom() { + true + } else { + false + } + }) => {} (None, rv @ Some(_)) | (Some(_), rv @ None) => { let this_status = DiffStatus::Bad; let message = Some(format!(