Remove map_err in favor of ?

`?` maps the error automatically.
This commit is contained in:
Thomas Eizinger 2021-02-25 12:51:30 +11:00
parent 7d324d966a
commit 1876d17ba4
No known key found for this signature in database
GPG Key ID: 651AC83A6C6C8B96

View File

@ -82,11 +82,9 @@ impl Wallet {
} }
pub async fn new_address(&self) -> Result<Address> { pub async fn new_address(&self) -> Result<Address> {
self.inner let address = self.inner.lock().await.get_new_address()?;
.lock()
.await Ok(address)
.get_new_address()
.map_err(Into::into)
} }
pub async fn get_tx(&self, txid: Txid) -> Result<Option<Transaction>> { pub async fn get_tx(&self, txid: Txid) -> Result<Option<Transaction>> {