Skip to content

Commit

Permalink
remove some more #![feature]s
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-1 committed Oct 27, 2023
1 parent ce81ae9 commit 2803e9e
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 18 deletions.
2 changes: 1 addition & 1 deletion azalea-buf/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion azalea-core/src/bitset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
1 change: 0 additions & 1 deletion azalea-nbt/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![doc = include_str!("../README.md")]
#![feature(min_specialization)]

mod decode;
mod encode;
Expand Down
4 changes: 2 additions & 2 deletions azalea-world/src/chunk_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
1 change: 0 additions & 1 deletion azalea-world/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![doc = include_str!("../README.md")]
#![feature(int_roundings)]
#![feature(error_generic_member_access)]

mod bit_storage;
Expand Down
2 changes: 0 additions & 2 deletions azalea/examples/testbot.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 0 additions & 1 deletion azalea/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![doc = include_str!("../README.md")]
#![feature(async_closure)]
#![allow(incomplete_features)]
#![feature(type_changing_struct_update)]
#![feature(lazy_cell)]
Expand Down
20 changes: 11 additions & 9 deletions azalea/src/swarm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
});
Expand Down

0 comments on commit 2803e9e

Please sign in to comment.