Skip to content

Commit f132960

Browse files
committed
cleanup
1 parent 30458b4 commit f132960

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

src/blocks/block.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ use bytemuck::{Pod, Zeroable};
33
use super::block_type::BlockType;
44
use crate::world::CHUNK_SIZE;
55
use glam::Vec3;
6-
use std::{
7-
cell::RefCell,
8-
rc::Rc,
9-
sync::{Arc, Mutex, MutexGuard, Weak},
10-
};
6+
use std::sync::MutexGuard;
117

128
#[derive(Debug)]
139
pub struct Block {

src/collision.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use std::mem::swap;
2-
31
#[derive(Debug, Clone)]
42
pub struct CollisionBox {
53
pub min_x: f32,
@@ -26,10 +24,10 @@ impl Ray {
2624
pub fn intersects_box(&self, collision_box: &CollisionBox) -> Option<Vec<glam::Vec3>> {
2725
let mut tmin;
2826
let mut tmax;
29-
let mut tymin;
30-
let mut tymax;
31-
let mut tzmin;
32-
let mut tzmax;
27+
let tymin;
28+
let tymax;
29+
let tzmin;
30+
let tzmax;
3331

3432
let invdirx = 1.0 / self.direction.x;
3533
let invdiry = 1.0 / self.direction.y;

src/world.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
use glam::Vec3;
2-
use std::any::Any;
3-
use std::ffi::c_void;
4-
use std::ops::Deref;
5-
use std::sync::Weak;
62
use std::{
73
sync::{mpsc, Arc, Mutex},
84
thread,
95
};
10-
use wgpu::util::DeviceExt;
116

127
use crate::utils::{ChunkFromPosition, RelativeFromAbsolute};
138
use crate::{blocks::block::Block, chunk::Chunk, player::Player, utils::threadpool::ThreadPool};

0 commit comments

Comments
 (0)