Compare commits
No commits in common. "680b176501ebbabb614fd1f055a018e657086e6d" and "ff3e0a50af68611dcda55560a0bf7079df5900fd" have entirely different histories.
680b176501
...
ff3e0a50af
@ -74,7 +74,7 @@ to_wasm!(
|
|||||||
WasmSrcBlock {
|
WasmSrcBlock {
|
||||||
additional_properties,
|
additional_properties,
|
||||||
language: original.language.map(|s| s.to_owned()),
|
language: original.language.map(|s| s.to_owned()),
|
||||||
value: original.get_value().into_owned(),
|
value: original.value.to_owned(),
|
||||||
switches: original.switches.map(|s| s.to_owned()),
|
switches: original.switches.map(|s| s.to_owned()),
|
||||||
parameters: original.parameters.map(|s| s.to_owned()),
|
parameters: original.parameters.map(|s| s.to_owned()),
|
||||||
number_lines: match original.number_lines {
|
number_lines: match original.number_lines {
|
||||||
|
@ -566,6 +566,7 @@ fn compare_object_tree<'e, 's, 'w>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (emacs_attribute, wasm_attribute) in emacs.iter().zip(wasm_attributes.iter()) {
|
for (emacs_attribute, wasm_attribute) in emacs.iter().zip(wasm_attributes.iter()) {
|
||||||
|
let emacs_attribute = emacs_attribute.as_list()?;
|
||||||
let wasm_attribute = wasm_attribute
|
let wasm_attribute = wasm_attribute
|
||||||
.as_array()
|
.as_array()
|
||||||
.ok_or("Wasm middle layer in object tree should be a list.")?;
|
.ok_or("Wasm middle layer in object tree should be a list.")?;
|
||||||
@ -579,16 +580,6 @@ fn compare_object_tree<'e, 's, 'w>(
|
|||||||
));
|
));
|
||||||
return Ok(result);
|
return Ok(result);
|
||||||
}
|
}
|
||||||
if let Ok("nil") = emacs_attribute.as_atom() {
|
|
||||||
if let Some(serde_json::Value::Null) = wasm_attribute.first() {
|
|
||||||
if let Some(serde_json::Value::Array(w)) = wasm_attribute.get(1) {
|
|
||||||
if w.is_empty() {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let emacs_attribute = emacs_attribute.as_list()?;
|
|
||||||
if let Some(serde_json::Value::Null) = wasm_attribute.first() {
|
if let Some(serde_json::Value::Null) = wasm_attribute.first() {
|
||||||
// If optval is null then the emacs array should only contain 1 value.
|
// If optval is null then the emacs array should only contain 1 value.
|
||||||
if emacs_attribute.len() != 1 {
|
if emacs_attribute.len() != 1 {
|
||||||
@ -631,26 +622,19 @@ fn compare_object_tree<'e, 's, 'w>(
|
|||||||
.ok_or("first value in wasm object tree should be a list.")?;
|
.ok_or("first value in wasm object tree should be a list.")?;
|
||||||
let emacs_val = emacs_attribute
|
let emacs_val = emacs_attribute
|
||||||
.first()
|
.first()
|
||||||
.ok_or("If-statement proves this will be Some.")?;
|
.ok_or("If-statement proves this will be Some.")?
|
||||||
|
.as_list()?;
|
||||||
let wasm_val = wasm_attribute
|
let wasm_val = wasm_attribute
|
||||||
.get(1)
|
.get(1)
|
||||||
.expect("If-statement proves this will be Some.")
|
.expect("If-statement proves this will be Some.")
|
||||||
.as_array()
|
.as_array()
|
||||||
.ok_or("2nd value in wasm object tree should be a list.")?;
|
.ok_or("2nd value in wasm object tree should be a list.")?;
|
||||||
result.extend(wasm_compare_list(source, emacs_optval, wasm_optval.iter())?)?;
|
result.extend(wasm_compare_list(source, emacs_optval, wasm_optval.iter())?)?;
|
||||||
if let Ok("nil") = emacs_val.as_atom() {
|
|
||||||
result.extend(wasm_compare_list(
|
result.extend(wasm_compare_list(
|
||||||
source,
|
source,
|
||||||
std::iter::empty(),
|
emacs_val.iter(),
|
||||||
wasm_val.iter(),
|
wasm_val.iter(),
|
||||||
)?)?;
|
)?)?;
|
||||||
} else {
|
|
||||||
result.extend(wasm_compare_list(
|
|
||||||
source,
|
|
||||||
emacs_val.as_list()?.iter(),
|
|
||||||
wasm_val.iter(),
|
|
||||||
)?)?;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user