Fix nightly clippy warnings

This commit is contained in:
Alexander Krotov
2020-09-19 16:21:34 +03:00
committed by link2xt
parent 92b304dee4
commit 332a387c98
11 changed files with 37 additions and 41 deletions

View File

@@ -3438,7 +3438,7 @@ pub unsafe extern "C" fn dc_accounts_select_account(
let accounts = &*accounts;
block_on(accounts.select_account(id))
.map(|_| 1)
.unwrap_or_else(|_| 0)
.unwrap_or(0)
}
#[no_mangle]
@@ -3450,7 +3450,7 @@ pub unsafe extern "C" fn dc_accounts_add_account(accounts: *mut dc_accounts_t) -
let accounts = &*accounts;
block_on(accounts.add_account()).unwrap_or_else(|_| 0)
block_on(accounts.add_account()).unwrap_or(0)
}
#[no_mangle]