mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
clippy
This commit is contained in:
parent
5910f9bdcf
commit
4355e7f74b
5 changed files with 6 additions and 15 deletions
|
@ -438,7 +438,7 @@ async fn auth_with_xbox_live(
|
|||
Ok(ExpiringValue {
|
||||
data: XboxLiveAuth {
|
||||
token: res.token,
|
||||
user_hash: res.display_claims["xui"].get(0).unwrap()["uhs"].clone(),
|
||||
user_hash: res.display_claims["xui"].first().unwrap()["uhs"].clone(),
|
||||
},
|
||||
expires_at,
|
||||
})
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#![doc = include_str!("../README.md")]
|
||||
#![feature(trait_upcasting)]
|
||||
|
||||
mod behavior;
|
||||
mod generated;
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
//! [`azalea`]: https://docs.rs/azalea
|
||||
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(trait_upcasting)]
|
||||
#![feature(error_generic_member_access)]
|
||||
|
||||
mod account;
|
||||
|
|
|
@ -135,7 +135,7 @@ impl IndexMerger {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new_indirect(var1: &Vec<f64>, var2: &Vec<f64>, var3: bool, var4: bool) -> Self {
|
||||
pub fn new_indirect(var1: &[f64], var2: &[f64], var3: bool, var4: bool) -> Self {
|
||||
let mut var5 = f64::NAN;
|
||||
let var7 = var1.len();
|
||||
let var8 = var2.len();
|
||||
|
@ -204,11 +204,7 @@ impl IndexMerger {
|
|||
|
||||
pub trait IndexConsumer = FnMut(i32, i32, i32) -> bool;
|
||||
|
||||
fn for_non_swapped_indexes(
|
||||
lower: &Vec<f64>,
|
||||
upper: &Vec<f64>,
|
||||
mut consumer: impl IndexConsumer,
|
||||
) -> bool {
|
||||
fn for_non_swapped_indexes(lower: &[f64], upper: &[f64], mut consumer: impl IndexConsumer) -> bool {
|
||||
let var2 = lower.len();
|
||||
for var3 in 0..var2 {
|
||||
if !consumer(var3.try_into().unwrap(), -1, var3.try_into().unwrap()) {
|
||||
|
|
|
@ -196,13 +196,10 @@ fn goto_listener(
|
|||
pathfinder.is_calculating = true;
|
||||
|
||||
let start = if let Some(executing_path) = executing_path
|
||||
&& let Some(final_node) = executing_path.path.back() {
|
||||
&& let Some(final_node) = executing_path.path.back()
|
||||
{
|
||||
// if we're currently pathfinding and got a goto event, start a little ahead
|
||||
executing_path
|
||||
.path
|
||||
.get(20)
|
||||
.unwrap_or(final_node)
|
||||
.target
|
||||
executing_path.path.get(20).unwrap_or(final_node).target
|
||||
} else {
|
||||
BlockPos::from(position)
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue