We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c99b9b commit 346986fCopy full SHA for 346986f
src/query/queryable.rs
@@ -70,7 +70,7 @@ where
70
71
fn as_array(&self) -> Option<&Vec<Self>>;
72
73
- fn as_object(&self) -> Option<Vec<(&String, &Self)>>;
+ fn as_object(&self) -> Option<Vec<(&str, &Self)>>;
74
75
fn as_str(&self) -> Option<&str>;
76
@@ -156,9 +156,9 @@ impl Queryable for Value {
156
self.as_array()
157
}
158
159
- fn as_object(&self) -> Option<Vec<(&String, &Self)>> {
+ fn as_object(&self) -> Option<Vec<(&str, &Self)>> {
160
self.as_object()
161
- .map(|v| v.into_iter().map(|(k, v)| (k, v)).collect())
+ .map(|v| v.into_iter().map(|(k, v)| (k.as_str(), v)).collect())
162
163
164
fn as_str(&self) -> Option<&str> {
0 commit comments