1
0
Fork 0
forked from alemi/upub

fix(apb): don't iter vec needlessly

This commit is contained in:
əlemi 2024-04-23 23:26:49 +02:00
parent ba07b2cb9d
commit deb5fe5744
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -321,9 +321,9 @@ pub fn set_maybe_node(obj: &mut serde_json::Value, key: &str, node: crate::Node<
obj, key, Some(serde_json::Value::String(l.href().to_string())),
);
},
crate::Node::Array(_) => {
crate::Node::Array(arr) => {
set_maybe_value(
obj, key, Some(serde_json::Value::Array(node.into_iter().collect())),
obj, key, Some(serde_json::Value::Array(arr.into())),
);
},
crate::Node::Empty => {