diff options
| author | mat <git@matdoes.dev> | 2023-10-26 22:26:07 -0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-10-26 22:26:14 -0500 |
| commit | 2803e9ef0d785538a23adceba44d45b162629979 (patch) | |
| tree | d64a61403a4f6955e0d8c2695d05498ba7cc2bac | |
| parent | ce81ae9cb30b62ee815d361f5762fb2f4a93670e (diff) | |
| download | azalea-drasl-2803e9ef0d785538a23adceba44d45b162629979.tar.xz | |
remove some more #![feature]s
| -rwxr-xr-x | azalea-buf/src/lib.rs | 2 | ||||
| -rwxr-xr-x | azalea-core/src/bitset.rs | 2 | ||||
| -rwxr-xr-x | azalea-nbt/src/lib.rs | 1 | ||||
| -rwxr-xr-x | azalea-world/src/chunk_storage.rs | 4 | ||||
| -rw-r--r-- | azalea-world/src/lib.rs | 1 | ||||
| -rw-r--r-- | azalea/examples/testbot.rs | 2 | ||||
| -rw-r--r-- | azalea/src/lib.rs | 1 | ||||
| -rw-r--r-- | azalea/src/swarm/mod.rs | 20 |
8 files changed, 15 insertions, 18 deletions
diff --git a/azalea-buf/src/lib.rs b/azalea-buf/src/lib.rs index d0eec5d4..fbde3684 100755 --- a/azalea-buf/src/lib.rs +++ b/azalea-buf/src/lib.rs @@ -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; diff --git a/azalea-core/src/bitset.rs b/azalea-core/src/bitset.rs index 52a34154..0be04a57 100755 --- a/azalea-core/src/bitset.rs +++ b/azalea-core/src/bitset.rs @@ -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)] diff --git a/azalea-nbt/src/lib.rs b/azalea-nbt/src/lib.rs index 740bd9e3..1a636520 100755 --- a/azalea-nbt/src/lib.rs +++ b/azalea-nbt/src/lib.rs @@ -1,5 +1,4 @@ #![doc = include_str!("../README.md")] -#![feature(min_specialization)] mod decode; mod encode; diff --git a/azalea-world/src/chunk_storage.rs b/azalea-world/src/chunk_storage.rs index aad0f979..03bdcbb5 100755 --- a/azalea-world/src/chunk_storage.rs +++ b/azalea-world/src/chunk_storage.rs @@ -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)] diff --git a/azalea-world/src/lib.rs b/azalea-world/src/lib.rs index 55e47676..6677b326 100644 --- a/azalea-world/src/lib.rs +++ b/azalea-world/src/lib.rs @@ -1,5 +1,4 @@ #![doc = include_str!("../README.md")] -#![feature(int_roundings)] #![feature(error_generic_member_access)] mod bit_storage; diff --git a/azalea/examples/testbot.rs b/azalea/examples/testbot.rs index de36a7ae..10bb9e4a 100644 --- a/azalea/examples/testbot.rs +++ b/azalea/examples/testbot.rs @@ -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; diff --git a/azalea/src/lib.rs b/azalea/src/lib.rs index bfa38fda..fa9d2e5a 100644 --- a/azalea/src/lib.rs +++ b/azalea/src/lib.rs @@ -1,5 +1,4 @@ #![doc = include_str!("../README.md")] -#![feature(async_closure)] #![allow(incomplete_features)] #![feature(type_changing_struct_update)] #![feature(lazy_cell)] diff --git a/azalea/src/swarm/mod.rs b/azalea/src/swarm/mod.rs index 6fae5d34..1f31db98 100644 --- a/azalea/src/swarm/mod.rs +++ b/azalea/src/swarm/mod.rs @@ -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; } }); |
