chore(apb): into_inner -> into_value
This commit is contained in:
parent
cfff8fb053
commit
f82e624fd9
2 changed files with 3 additions and 3 deletions
|
@ -311,7 +311,7 @@ pub fn set_maybe_node(obj: &mut serde_json::Value, key: &str, node: crate::Node<
|
||||||
if node.is_empty() {
|
if node.is_empty() {
|
||||||
set_maybe_value(obj, key, None)
|
set_maybe_value(obj, key, None)
|
||||||
} else {
|
} else {
|
||||||
set_maybe_value(obj, key, Some(node.into_inner()))
|
set_maybe_value(obj, key, Some(node.into_value()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@ impl<T : super::Base> Node<T> {
|
||||||
|
|
||||||
#[cfg(feature = "unstructured")]
|
#[cfg(feature = "unstructured")]
|
||||||
impl Node<serde_json::Value> {
|
impl Node<serde_json::Value> {
|
||||||
pub fn into_inner(self) -> serde_json::Value {
|
pub fn into_value(self) -> serde_json::Value {
|
||||||
match self {
|
match self {
|
||||||
Self::Object(x) => *x,
|
Self::Object(x) => *x,
|
||||||
Self::Link(l) => serde_json::Value::String(l.href().unwrap_or_default().to_string()),
|
Self::Link(l) => serde_json::Value::String(l.href().unwrap_or_default().to_string()),
|
||||||
|
@ -129,7 +129,7 @@ impl Node<serde_json::Value> {
|
||||||
Self::Array(arr) => serde_json::Value::Array(
|
Self::Array(arr) => serde_json::Value::Array(
|
||||||
arr
|
arr
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|x| x.into_inner())
|
.map(|x| x.into_value())
|
||||||
.collect()
|
.collect()
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue