decode add hash_set
@@ -83,17 +83,19 @@ pub fn json_decode<T: ?Sized>(datas: Vec<serde_json::Value>) -> Result<T, crate:
}
fn is_array(type_name: &str) -> bool {
- if type_name.starts_with("alloc::collections::linked_list")
+ if type_name.starts_with("[")
+ || type_name.starts_with("&[")
+ || type_name.starts_with("alloc::collections::linked_list")
|| type_name.starts_with("alloc::collections::vec_deque")
+ || type_name.starts_with("std::collections::hash::set")
|| type_name.starts_with("alloc::vec::Vec<")
- || type_name.starts_with("[")
- || type_name.starts_with("&[")
- || type_name.starts_with("core::option::Option<alloc::collections::linked_list")
- || type_name.starts_with("core::option::Option<alloc::collections::vec_deque")
- || type_name.starts_with("core::option::Option<alloc::vec::Vec<")
|| type_name.starts_with("core::option::Option<[")
|| type_name.starts_with("core::option::Option<&[")
+ || type_name.starts_with("core::option::Option<alloc::vec::Vec<")
+ || type_name.starts_with("core::option::Option<alloc::collections::linked_list")
+ || type_name.starts_with("core::option::Option<alloc::collections::vec_deque")
+ || type_name.starts_with("core::option::Option<std::collections::hash::set")
{
return true;
}
