mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 14:26:04 +00:00
Merge branch 'main' into options
This commit is contained in:
commit
8d0322cbe7
4 changed files with 9 additions and 9 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#![feature(let_chains)]
|
||||
|
||||
mod auth;
|
||||
mod cache;
|
||||
pub mod game_profile;
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#![feature(trait_alias)]
|
||||
#![feature(let_chains)]
|
||||
|
||||
pub mod collision;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue