Skip to content

Commit

Permalink
Add clippy fixes and bump to v1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
iMilchshake committed Nov 30, 2024
1 parent 0f31083 commit e6ede77
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gores-mapgen"
version = "1.0.0"
version = "1.0.2"
edition = "2021"
default-run = "gores-generator"

Expand Down
6 changes: 2 additions & 4 deletions src/bin/benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ fn get_seed_iter(args: &Args) -> SeedIter {
fn main() {
let args = Args::parse();

dbg!(&args);

// determine seed count
// TODO: iterates over one entire seed_gen once.. -> implement size_hint()?
let seed_count = get_seed_iter(&args).count();
Expand All @@ -58,7 +56,7 @@ fn main() {
None => MapConfig::get_all_configs(),
};

if init_map_configs.len() == 0 {
if init_map_configs.is_empty() {
panic!(
"no map config defined, map_preset_names={:?}",
args.map_preset_names
Expand All @@ -73,7 +71,7 @@ fn main() {
None => GenerationConfig::get_all_configs(),
};

if init_gen_configs.len() == 0 {
if init_gen_configs.is_empty() {
panic!(
"no generation config defined, gen_preset_names={:?}",
args.gen_preset_names
Expand Down
8 changes: 3 additions & 5 deletions src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,14 @@ impl DebugLayers {
),
]);

// initialize using keys from all debug layers, or re-use
let active_layers = if previous_active_layers.is_none() {
// initialize using keys from all debug layers, or re-use if possible
let active_layers = previous_active_layers.unwrap_or_else(|| {
bool_layers
.keys()
.chain(float_layers.keys())
.map(|key| (*key, false))
.collect()
} else {
previous_active_layers.unwrap()
};
});

DebugLayers {
active_layers,
Expand Down
2 changes: 1 addition & 1 deletion src/rendering.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::map_camera::MapCamera;
use crate::{map::BlockType, map::KernelType, position::Position, walker::CuteWalker};
use crate::{map::BlockType, map::KernelType, walker::CuteWalker};
use macroquad::color::colors;
use macroquad::color::Color;
use macroquad::shapes::*;
Expand Down

0 comments on commit e6ede77

Please sign in to comment.