Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Type annotation for next_key() matching of json filter options #11192

Merged
merged 3 commits into from
Oct 23, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ethcore/src/miner/filter_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ impl<'de> Deserialize<'de> for FilterOptions {
M: MapAccess<'de>,
{
let mut filter = FilterOptions::default();
while let Some(key) = map.next_key()? {
match key {
while let Some(key) = map.next_key::<String>()? {
match key.as_str() {
"from" => {
filter.from = map.validate_from()?;
},
Expand Down Expand Up @@ -221,8 +221,8 @@ impl<'de> Deserialize<'de> for FilterOptions {
let mut counter = 0;
let mut f_op = Wrapper::O(FilterOperator::Any);

while let Some(key) = map.next_key()? {
match key {
while let Some(key) = map.next_key::<String>()? {
match key.as_str() {
"eq" => f_op = W::O(FilterOperator::Eq(map.next_value()?)),
"gt" => f_op = W::O(FilterOperator::GreaterThan(map.next_value()?)),
"lt" => f_op = W::O(FilterOperator::LessThan(map.next_value()?)),
Expand Down