From 65da123631b0a2dc078786f60fa6b213e8b430ee Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Sun, 23 Oct 2022 19:00:24 -0500 Subject: Add Client::set_client_information (#33) * start adding options * add default options * send options packet by default * mention set_options in Client::join doc * make TranslatableComponent::read return TextComponent * change set_options to set_client_information * clean up some code * Add `Initialize` event * fix some clippy warnings * change `Client::options` to `client_information` --- azalea-auth/src/auth.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'azalea-auth/src') diff --git a/azalea-auth/src/auth.rs b/azalea-auth/src/auth.rs index 3e5f82d8..0d7c7ace 100644 --- a/azalea-auth/src/auth.rs +++ b/azalea-auth/src/auth.rs @@ -56,11 +56,7 @@ pub enum AuthError { /// though, and in case the Microsoft API does start providing the real email. pub async fn auth(email: &str, opts: AuthOpts) -> Result { 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 - } + cache::get_account_in_cache(cache_file, email).await } else { None }; -- cgit v1.2.3