aboutsummaryrefslogtreecommitdiff
path: root/azalea-client
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-client')
-rw-r--r--azalea-client/src/account.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/azalea-client/src/account.rs b/azalea-client/src/account.rs
index 2fedc4f5..42bfe6fc 100644
--- a/azalea-client/src/account.rs
+++ b/azalea-client/src/account.rs
@@ -46,13 +46,12 @@ impl Account {
/// a key for the cache, but it's recommended to use the real email to
/// avoid confusion.
pub async fn microsoft(email: &str) -> Result<Self, azalea_auth::AuthError> {
- let minecraft_dir = get_mc_dir::minecraft_dir().expect(
- format!(
+ let minecraft_dir = get_mc_dir::minecraft_dir().unwrap_or_else(|| {
+ panic!(
"No {} environment variable found",
get_mc_dir::home_env_var()
)
- .as_str(),
- );
+ });
let auth_result = azalea_auth::auth(
email,
azalea_auth::AuthOpts {