mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-17 04:45:02 +01:00
Fix some clippy warnings
This commit is contained in:
parent
c94beea85e
commit
ff6dcca482
2 changed files with 2 additions and 9 deletions
|
|
@ -30,7 +30,7 @@ pub struct ScreenPos {
|
||||||
pub type ScreenPosScalar = i16;
|
pub type ScreenPosScalar = i16;
|
||||||
|
|
||||||
impl ScreenPos {
|
impl ScreenPos {
|
||||||
pub fn to_sf_vec(&self) -> Vector2f {
|
pub fn to_sf_vec(self) -> Vector2f {
|
||||||
Vector2f::new(self.x.into(), self.y.into())
|
Vector2f::new(self.x.into(), self.y.into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,19 +9,12 @@ pub struct ChunkPos {
|
||||||
y: ChunkPosScalar,
|
y: ChunkPosScalar,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
pub struct World {
|
pub struct World {
|
||||||
/// The currently loaded chunks
|
/// The currently loaded chunks
|
||||||
chunks: FnvHashMap<ChunkPos, Chunk>,
|
chunks: FnvHashMap<ChunkPos, Chunk>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for World {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self {
|
|
||||||
chunks: Default::default(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl World {
|
impl World {
|
||||||
/// Get mutable access to the tile at `pos`.
|
/// Get mutable access to the tile at `pos`.
|
||||||
///
|
///
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue