Skip to content

Commit

Permalink
Update the docs for BaseFilter to mention that the filter is _not_ un…
Browse files Browse the repository at this point in the history
…installed on Drop
  • Loading branch information
marmistrz committed Jan 13, 2022
1 parent 81c41ae commit fb8a279
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/api/eth_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ impl FilterInterface for PendingTransactionsFilter {
}

/// Base filter handle.
/// Uninstall filter on drop.
/// Allows to poll the filter.
///
/// Note: because Rust currently doesn't support async drop, the filter has to be uninstalled manually.
/// See [https://github.com/tomusdrw/rust-web3/issues/583](this tracking issue).
pub struct BaseFilter<T: Transport, I> {
// TODO [ToDr] Workaround for ganache returning 0x03 instead of 0x3
id: String,
Expand Down Expand Up @@ -107,7 +109,7 @@ impl<T: Transport, I> Clone for BaseFilter<T, I> {

impl<T: Transport, I> BaseFilter<T, I> {
/// Uninstalls the filter
pub async fn uninstall(self) -> error::Result<bool>
pub async fn uninstall_borrowed(&self) -> error::Result<bool>
where
Self: Sized,
{
Expand Down

0 comments on commit fb8a279

Please sign in to comment.