diff --git a/apb/src/macros.rs b/apb/src/macros.rs index e9d75cd..0d8fced 100644 --- a/apb/src/macros.rs +++ b/apb/src/macros.rs @@ -311,7 +311,7 @@ pub fn set_maybe_node(obj: &mut serde_json::Value, key: &str, node: crate::Node< if node.is_empty() { set_maybe_value(obj, key, None) } else { - set_maybe_value(obj, key, Some(node.into_inner())) + set_maybe_value(obj, key, Some(node.into_value())) } } diff --git a/apb/src/node.rs b/apb/src/node.rs index 5fccd47..1772f6c 100644 --- a/apb/src/node.rs +++ b/apb/src/node.rs @@ -121,7 +121,7 @@ impl Node { #[cfg(feature = "unstructured")] impl Node { - pub fn into_inner(self) -> serde_json::Value { + pub fn into_value(self) -> serde_json::Value { match self { Self::Object(x) => *x, Self::Link(l) => serde_json::Value::String(l.href().unwrap_or_default().to_string()), @@ -129,7 +129,7 @@ impl Node { Self::Array(arr) => serde_json::Value::Array( arr .into_iter() - .map(|x| x.into_inner()) + .map(|x| x.into_value()) .collect() ), }