commit
This commit is contained in:
parent
e71891343c
commit
28c808f07f
@ -22,12 +22,15 @@ where
|
|||||||
|
|
||||||
pub fn serialize_hints<S>(
|
pub fn serialize_hints<S>(
|
||||||
hints: &HashMap<String, OwnedValue>,
|
hints: &HashMap<String, OwnedValue>,
|
||||||
serializer: Serializer,
|
serializer: S,
|
||||||
) -> Result<S::Ok, S::Error> {
|
) -> Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: Serializer,
|
||||||
|
{
|
||||||
let mut hint_map = serde_json::Map::new();
|
let mut hint_map = serde_json::Map::new();
|
||||||
|
|
||||||
for hint in hints {
|
for hint in hints {
|
||||||
if let (hint_name, hint_val) = hint {
|
let (hint_name, hint_val) = hint;
|
||||||
let mut h = serde_json::Map::new();
|
let mut h = serde_json::Map::new();
|
||||||
let sig = hint_val.value_signature();
|
let sig = hint_val.value_signature();
|
||||||
let val = hint_val.try_clone();
|
let val = hint_val.try_clone();
|
||||||
@ -35,7 +38,6 @@ pub fn serialize_hints<S>(
|
|||||||
|
|
||||||
hint_map.insert(hint_name.clone(), serde_json::Value::Object(h.clone()));
|
hint_map.insert(hint_name.clone(), serde_json::Value::Object(h.clone()));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
hint_map.serialize(serializer)
|
hint_map.serialize(serializer)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user