Fix node name getting chopped off.
Some checks failed
clippy Build clippy has failed
rust-foreign-document-test Build rust-foreign-document-test has succeeded
rust-build Build rust-build has failed
rust-test Build rust-test has failed

This commit is contained in:
Tom Alexander 2023-12-29 21:27:05 -05:00
parent a4414369ce
commit a4a83d047d
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 7 additions and 7 deletions

View File

@ -254,11 +254,13 @@ fn compare_ast_node<'e, 's, 'w>(
let wasm_attribute_value = wasm_attributes_map.get(attribute_name);
let emacs_key = wasm_key_to_emacs_key(attribute_name);
let emacs_attribute_value = emacs_attributes_map.get(emacs_key.as_str()).map(|e| *e);
layer.extend(compare_optional_json_value(
source,
emacs_attribute_value,
wasm_attribute_value,
)?)?;
let inner_layer =
compare_optional_json_value(source, emacs_attribute_value, wasm_attribute_value)?;
if !inner_layer.name.is_empty() {
layer.children.push(inner_layer);
} else {
layer.extend(inner_layer)?;
}
result.children.push(layer);
}
}

View File

@ -45,8 +45,6 @@ impl<'s> WasmDiffResult<'s> {
pub fn print(&self, original_document: &str) -> Result<(), Box<dyn std::error::Error>> {
self.print_indented(0, original_document)
// println!("{:#?}", self);
// todo!()
}
fn print_indented(