fix: block -> check

This commit is contained in:
orion 2023-07-23 23:05:31 -05:00
parent 039be77d99
commit 620add44de
Signed by: orion
GPG Key ID: 6D4165AE4C928719

View File

@ -108,7 +108,7 @@ pub trait GenericClient {
common!(Self::Transaction<'_>, Self::Error); common!(Self::Transaction<'_>, Self::Error);
fn block_for_notify(&mut self) -> Result<Option<Notification>, Self::Error>; fn check_for_notify(&mut self) -> Result<Option<Notification>, Self::Error>;
} }
impl GenericClient for Client { impl GenericClient for Client {
@ -192,9 +192,9 @@ impl GenericClient for Client {
self.transaction() self.transaction()
} }
fn block_for_notify(&mut self) -> Result<Option<Notification>, Error> { fn check_for_notify(&mut self) -> Result<Option<Notification>, Self::Error> {
let mut n = self.notifications(); let mut n = self.notifications();
let mut n = n.blocking_iter(); let mut n = n.iter();
n.next() n.next()
} }
} }
@ -296,7 +296,7 @@ impl GenericClient for Transaction<'_> {
type Row = Row; type Row = Row;
transaction_common!(Self::Transaction<'_>); transaction_common!(Self::Transaction<'_>);
fn block_for_notify(&mut self) -> Result<Option<Notification>, Self::Error> { fn check_for_notify(&mut self) -> Result<Option<Notification>, Self::Error> {
Ok(None) Ok(None)
} }
} }