fix(tui): clippy question_mark / unwrap_or_default in open_wallet
CI clippy -D warnings failed on the match arms in src/tui.rs:1603.
This commit is contained in:
parent
7cf98bb9fe
commit
9c4067d09e
1 changed files with 2 additions and 8 deletions
10
src/tui.rs
10
src/tui.rs
|
|
@ -1600,15 +1600,9 @@ impl App {
|
|||
}
|
||||
|
||||
fn open_wallet(&mut self) -> Result<(), String> {
|
||||
let addr = match self.rt.block_on(self.node.wallet_receive_address()) {
|
||||
Ok(a) => a,
|
||||
Err(e) => return Err(e),
|
||||
};
|
||||
let addr = self.rt.block_on(self.node.wallet_receive_address())?;
|
||||
let balance = self.rt.block_on(self.node.wallet_balance());
|
||||
let transfers = match self.rt.block_on(self.node.wallet_recent_transfers(8)) {
|
||||
Ok(t) => t,
|
||||
Err(_) => Vec::new(),
|
||||
};
|
||||
let transfers = self.rt.block_on(self.node.wallet_recent_transfers(8)).unwrap_or_default();
|
||||
self.screen = Screen::Wallet {
|
||||
receive_addr: addr,
|
||||
balance,
|
||||
|
|
|
|||
Loading…
Reference in a new issue