From deb5fe5744f7a52384d30595987da87aeade421f Mon Sep 17 00:00:00 2001 From: alemi Date: Tue, 23 Apr 2024 23:26:49 +0200 Subject: [PATCH] fix(apb): don't iter vec needlessly --- apb/src/macros.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apb/src/macros.rs b/apb/src/macros.rs index e4f787be..3acd72ef 100644 --- a/apb/src/macros.rs +++ b/apb/src/macros.rs @@ -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 => {