1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 06:16:04 +00:00

Remove let chains

This commit is contained in:
mat 2022-10-20 22:16:34 -05:00
parent 41606fdd14
commit 8d0cad7784
4 changed files with 9 additions and 9 deletions

View file

@ -69,7 +69,8 @@ pub async fn auth(email: &str, opts: AuthOpts) -> Result<AuthResult, AuthError>
let profile: ProfileResponse;
let minecraft_access_token: String;
if let Some(account) = &cached_account && !account.mca.is_expired() {
if cached_account.is_some() && !cached_account.as_ref().unwrap().mca.is_expired() {
let account = cached_account.as_ref().unwrap();
// the minecraft auth data is cached and not expired, so we can just
// use that instead of doing auth all over again :)
profile = account.profile.clone();
@ -129,7 +130,8 @@ pub async fn auth(email: &str, opts: AuthOpts) -> Result<AuthResult, AuthError>
profile: profile.clone(),
},
)
.await {
.await
{
log::error!("{}", e);
}
}

View file

@ -1,5 +1,3 @@
#![feature(let_chains)]
mod auth;
mod cache;
pub mod game_profile;

View file

@ -171,9 +171,10 @@ impl Shapes {
);
let var8 = BitSetDiscreteVoxelShape::join(&a.shape(), &b.shape(), &var5, &var6, &var7, op);
// if var5.is_discrete_cube_merger()
if let IndexMerger::DiscreteCube { .. } = var5
&& let IndexMerger::DiscreteCube { .. } = var6
&& let IndexMerger::DiscreteCube { .. } = var7
if matches!(var5, IndexMerger::DiscreteCube { .. })
&& matches!(var6, IndexMerger::DiscreteCube { .. })
&& matches!(var7, IndexMerger::DiscreteCube { .. })
{
VoxelShape::Cube(CubeVoxelShape::new(DiscreteVoxelShape::BitSet(var8)))
} else {

View file

@ -1,5 +1,4 @@
#![feature(trait_alias)]
#![feature(let_chains)]
pub mod collision;