mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
remove some more #![feature]s
This commit is contained in:
parent
ce81ae9cb3
commit
2803e9ef0d
8 changed files with 15 additions and 18 deletions
|
@ -1,6 +1,6 @@
|
|||
#![doc = include_str!("../README.md")]
|
||||
#![feature(min_specialization)]
|
||||
// these two are necessary for thiserror backtraces
|
||||
// this is necessary for thiserror backtraces
|
||||
#![feature(error_generic_member_access)]
|
||||
|
||||
mod definitions;
|
||||
|
|
|
@ -127,7 +127,7 @@ impl From<Vec<u8>> for BitSet {
|
|||
/// A list of bits with a known fixed size.
|
||||
///
|
||||
/// Note that this is primarily meant for fast serialization and deserialization
|
||||
/// Minecraft, if you don't need that you should use the `fixedbitset` crate
|
||||
/// for Minecraft, if you don't need that you should use the `fixedbitset` crate
|
||||
/// since it's approximately 20% faster (since it stores the data as usizes
|
||||
/// instead of u8s)
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#![doc = include_str!("../README.md")]
|
||||
#![feature(min_specialization)]
|
||||
|
||||
mod decode;
|
||||
mod encode;
|
||||
|
|
|
@ -436,8 +436,8 @@ impl Default for ChunkStorage {
|
|||
#[inline]
|
||||
pub fn section_index(y: i32, min_y: i32) -> u32 {
|
||||
assert!(y >= min_y, "y ({y}) must be at least {min_y}");
|
||||
let min_section_index = min_y.div_floor(16);
|
||||
(y.div_floor(16) - min_section_index) as u32
|
||||
let min_section_index = min_y >> 4;
|
||||
((y >> 4) - min_section_index) as u32
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#![doc = include_str!("../README.md")]
|
||||
#![feature(int_roundings)]
|
||||
#![feature(error_generic_member_access)]
|
||||
|
||||
mod bit_storage;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
//! a bot for testing new azalea features
|
||||
|
||||
#![feature(type_alias_impl_trait)]
|
||||
|
||||
use azalea::ecs::query::With;
|
||||
use azalea::entity::{metadata::Player, EyeHeight, Position};
|
||||
use azalea::interact::HitResultComponent;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#![doc = include_str!("../README.md")]
|
||||
#![feature(async_closure)]
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(type_changing_struct_update)]
|
||||
#![feature(lazy_cell)]
|
||||
|
|
|
@ -357,15 +357,17 @@ where
|
|||
} else {
|
||||
// otherwise, join all at once
|
||||
let swarm_borrow = &swarm_clone;
|
||||
join_all(accounts.iter().zip(states).map(
|
||||
async move |(account, state)| -> Result<(), JoinError> {
|
||||
swarm_borrow
|
||||
.clone()
|
||||
.add_with_exponential_backoff(account, state)
|
||||
.await;
|
||||
Ok(())
|
||||
},
|
||||
))
|
||||
join_all(
|
||||
accounts
|
||||
.iter()
|
||||
.zip(states)
|
||||
.map(move |(account, state)| async {
|
||||
swarm_borrow
|
||||
.clone()
|
||||
.add_with_exponential_backoff(account, state)
|
||||
.await;
|
||||
}),
|
||||
)
|
||||
.await;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue