Skip to content

Commit

Permalink
Cargo clippy and fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
splashdust committed Jan 13, 2025
1 parent ab4f3c0 commit e09aacd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions src/mesh_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ impl<C: VoxelWorldConfig> MeshCache<C> {
pub fn get_user_bundle(&self, voxels_hash: &u64) -> Option<C::ChunkUserBundle> {
self.user_bundes.read().unwrap().get(voxels_hash).cloned()
}

pub fn get_user_bundle_map(&self) -> Arc<RwLock<UserBundleMap<C::ChunkUserBundle>>> {
self.user_bundes.clone()
}
}

impl<C: VoxelWorldConfig> Default for MeshCache<C> {
Expand All @@ -77,9 +73,11 @@ impl<C: VoxelWorldConfig> Default for MeshCache<C> {
}
}

type MeshHandleRef = Arc<Handle<Mesh>>;

#[derive(Resource, Deref, DerefMut)]
pub(crate) struct MeshCacheInsertBuffer<C: VoxelWorldConfig>(
#[deref] Vec<(u64, Arc<Handle<Mesh>>, Option<C::ChunkUserBundle>)>,
#[deref] Vec<(u64, MeshHandleRef, Option<C::ChunkUserBundle>)>,
PhantomData<C>,
);

Expand Down
2 changes: 1 addition & 1 deletion src/voxel_world_internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/// This module contains the internal systems and resources used to implement bevy_voxel_world.
///
use bevy::{
ecs::{bundle, system::SystemParam},
ecs::system::SystemParam,
prelude::*,
tasks::AsyncComputeTaskPool,
utils::{HashMap, HashSet},
Expand Down

0 comments on commit e09aacd

Please sign in to comment.