mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
fix rustc panic
This commit is contained in:
parent
051f52474d
commit
4c9de35cc2
1 changed files with 9 additions and 3 deletions
|
@ -55,9 +55,15 @@ pub enum AuthError {
|
|||
/// anything. You should just have it be the actual email so it's not confusing
|
||||
/// though, and in case the Microsoft API does start providing the real email.
|
||||
pub async fn auth(email: &str, opts: AuthOpts) -> Result<AuthResult, AuthError> {
|
||||
let cached_account = if let Some(cache_file) = &opts.cache_file && let Some(account) = cache::get_account_in_cache(cache_file, email).await {
|
||||
Some(account)
|
||||
} else { None };
|
||||
let cached_account = if let Some(cache_file) = &opts.cache_file {
|
||||
if let Some(account) = cache::get_account_in_cache(cache_file, email).await {
|
||||
Some(account)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
// these two MUST be set by the end, since we return them in AuthResult
|
||||
let profile: ProfileResponse;
|
||||
|
|
Loading…
Add table
Reference in a new issue