Using owned string did not solve it.

This commit is contained in:
Tom Alexander 2023-10-11 14:00:18 -04:00
parent f3307a8159
commit a89339e472
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -1,3 +1,4 @@
use std::borrow::Cow;
use std::collections::BTreeSet; use std::collections::BTreeSet;
use std::fmt::Debug; use std::fmt::Debug;
use std::str::FromStr; use std::str::FromStr;
@ -5,6 +6,7 @@ use std::str::FromStr;
use super::diff::artificial_diff_scope; use super::diff::artificial_diff_scope;
use super::diff::compare_ast_node; use super::diff::compare_ast_node;
use super::diff::DiffEntry; use super::diff::DiffEntry;
use super::diff::DiffLayer;
use super::diff::DiffStatus; use super::diff::DiffStatus;
use super::sexp::unquote; use super::sexp::unquote;
use super::sexp::Token; use super::sexp::Token;
@ -479,8 +481,12 @@ pub(crate) fn compare_property_list_of_list_of_list_of_ast_nodes<
for (e, r) in value.iter().zip(rust_value) { for (e, r) in value.iter().zip(rust_value) {
child_status.push(compare_ast_node(source, e, r.into())?); child_status.push(compare_ast_node(source, e, r.into())?);
} }
let diff_scope = artificial_diff_scope(emacs_field, child_status)?; let diff_scope = DiffLayer {
return Ok(ComparePropertiesResult::DiffEntry(diff_scope)); name: Cow::Owned(emacs_field.to_string()),
children: child_status,
};
// let diff_scope = artificial_diff_scope(emacs_field, child_status)?;
return Ok(ComparePropertiesResult::DiffEntry(diff_scope.into()));
} }
Ok(ComparePropertiesResult::NoChange) Ok(ComparePropertiesResult::NoChange)
} }