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:
Thomas Eizinger 2021-02-19 17:00:45 +11:00 committed by Daniel Karzel
parent 519d1a5701
commit b47b06aa23
11 changed files with 21 additions and 17 deletions

View file

@ -186,7 +186,7 @@ pub trait Transfer {
public_spend_key: PublicKey,
public_view_key: PublicViewKey,
amount: Amount,
) -> anyhow::Result<(TransferProof, Amount)>;
) -> Result<(TransferProof, Amount)>;
}
#[async_trait]
@ -215,17 +215,17 @@ pub trait CreateWalletForOutput {
private_spend_key: PrivateKey,
private_view_key: PrivateViewKey,
restore_height: Option<u32>,
) -> anyhow::Result<()>;
) -> Result<()>;
}
#[async_trait]
pub trait OpenWallet {
async fn open_wallet(&self, file_name: &str) -> anyhow::Result<()>;
async fn open_wallet(&self, file_name: &str) -> Result<()>;
}
#[async_trait]
pub trait CreateWallet {
async fn create_wallet(&self, file_name: &str) -> anyhow::Result<()>;
async fn create_wallet(&self, file_name: &str) -> Result<()>;
}
#[derive(thiserror::Error, Debug, Clone, PartialEq)]