From f82e624fd9e68cfc9c7460bdfcdf6bdcd5c5c8c2 Mon Sep 17 00:00:00 2001 From: alemi Date: Tue, 19 Nov 2024 14:19:25 +0100 Subject: [PATCH] chore(apb): into_inner -> into_value --- apb/src/macros.rs | 2 +- apb/src/node.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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() ), }