mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-08 22:42:35 -04:00
Import anyhow::Result across the codebase
There is no need to fully qualify this type because it is a type alias for std::Result. We can mix and match the two as we want.
This commit is contained in:
parent
519d1a5701
commit
b47b06aa23
11 changed files with 21 additions and 17 deletions
|
@ -1,4 +1,5 @@
|
|||
use crate::bitcoin;
|
||||
use anyhow::Result;
|
||||
use libp2p::{core::Multiaddr, PeerId};
|
||||
use std::path::PathBuf;
|
||||
use uuid::Uuid;
|
||||
|
@ -85,7 +86,7 @@ pub enum Refund {
|
|||
},
|
||||
}
|
||||
|
||||
fn parse_btc(str: &str) -> anyhow::Result<bitcoin::Amount> {
|
||||
fn parse_btc(str: &str) -> Result<bitcoin::Amount> {
|
||||
let amount = bitcoin::Amount::from_str_in(str, ::bitcoin::Denomination::Bitcoin)?;
|
||||
Ok(amount)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue