eth_uninstallFilter should return false for non-existent filter (#8280)
* eth_uninstallFilter should return false for non-existent filter * Use shorter form is_some()
This commit is contained in:
parent
443115f885
commit
1e6d889fc7
@ -74,8 +74,8 @@ impl<F, T> PollManager<F, T> where T: Timer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Removes poll info.
|
/// Removes poll info.
|
||||||
pub fn remove_poll(&mut self, id: &PollId) {
|
pub fn remove_poll(&mut self, id: &PollId) -> bool {
|
||||||
self.polls.remove(id);
|
self.polls.remove(id).is_some()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,7 +242,6 @@ impl<T: Filterable + Send + Sync + 'static> EthFilter for T {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn uninstall_filter(&self, index: Index) -> Result<bool> {
|
fn uninstall_filter(&self, index: Index) -> Result<bool> {
|
||||||
self.polls().lock().remove_poll(&index.value());
|
Ok(self.polls().lock().remove_poll(&index.value()))
|
||||||
Ok(true)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user