Merge commit 'refs/pull/32/head' of github.com:bitcoindevkit/rust-electrum-client

This commit is contained in:
Alekos Filini 2021-01-21 09:01:27 -05:00
commit af10aeac99
No known key found for this signature in database
GPG Key ID: 431401E4A4530061
3 changed files with 4 additions and 4 deletions

View File

@ -183,5 +183,5 @@ pub trait ElectrumApi {
#[cfg(feature = "debug-calls")]
/// Returns the number of network calls made since the creation of the client.
fn calls_made(&self) -> usize;
fn calls_made(&self) -> Result<usize, Error>;
}

View File

@ -285,7 +285,7 @@ impl ElectrumApi for Client {
#[inline]
#[cfg(feature = "debug-calls")]
fn calls_made(&self) -> usize {
fn calls_made(&self) -> Result<usize, Error> {
impl_inner_call!(self, calls_made)
}
}

View File

@ -984,8 +984,8 @@ impl<T: Read + Write> ElectrumApi for RawClient<T> {
}
#[cfg(feature = "debug-calls")]
fn calls_made(&self) -> usize {
self.calls.load(Ordering::SeqCst)
fn calls_made(&self) -> Result<usize, Error> {
Ok(self.calls.load(Ordering::SeqCst))
}
}