/// Removes all accounts reported by the supplied account manager.
Removes all accounts reported by the supplied account manager.
Removes all accounts reported by the supplied account manager .
async fn remove_all(account_manager: &AccountManagerProxy) -> Result<(), Error> {
    let ids = account_manager.get_account_ids().await?;
    if ids.is_empty() {
        println!("No accounts to remove.");
        return Ok(());
    }
    for id in ids {
        account_manager
            .remove_account(id, true)
            .await?
            .map_err(|err| anyhow!("Failed to remove account {}: {:?}", id, err))?;
        println!("Removed account {}", id);
    }
    Ok(())
}
async fn remove_all ( account_manager : & AccountManagerProxy ) -> Result < ( ) , Error > { let ids = account_manager . get_account_ids ( ) . await ? ; if ids . is_empty ( ) { println ! ( " " ) ; return Ok ( ( ) ) ; } for id in ids { account_manager . remove_account ( id , true ) . await ? . map_err ( | err | anyhow ! ( " " id err ) ) ? ; println ! ( " " id ) ; } Ok ( ( ) ) }
Removes all accounts reported by the supplied account manager.
Removes all accounts reported by the supplied account manager .
account_manager
&AccountManagerProxy