fix all warnings
All checks were successful
Rust / rustfmt (push) Successful in 21s
Rust / clippy (push) Successful in 1m28s
Rust / build (push) Successful in 2m16s

This commit is contained in:
Dominic 2024-07-07 17:55:22 +02:00
parent e5e2ccfc6b
commit 8e04d74682
Signed by: msrd0
GPG key ID: AAF7C8430CA3345D
3 changed files with 6 additions and 6 deletions

View file

@ -122,16 +122,16 @@ impl AssetsWriter {
writeln!(file, "{indent}impl Assets {{")?;
writeln!(
file,
"{indent}\tpub fn load(c: &mut comfy::EngineContext<'_>) {{"
"{indent}\tpub fn load(_ctx: &mut comfy::EngineContext<'_>) {{"
)?;
for asset_const_name in root.assets.values() {
writeln!(file, "{indent}\t\tc.load_texture_from_bytes({asset_const_name:?}, {asset_const_name});")?;
writeln!(file, "{indent}\t\t_ctx.load_texture_from_bytes({asset_const_name:?}, {asset_const_name});")?;
}
for asset_const_name in root.sound_assets.values() {
writeln!(file, "{indent}\t\tcomfy::load_sound_from_bytes({asset_const_name:?}, {asset_const_name}, Default::default());")?;
}
for group_name in root.groups.keys() {
writeln!(file, "{indent}\t\t{group_name}::Assets::load(c);")?;
writeln!(file, "{indent}\t\t{group_name}::Assets::load(_ctx);")?;
}
writeln!(file, "{indent}\t}}")?;
writeln!(file, "{indent}}}")?;

View file

@ -2,7 +2,7 @@ use super::{furniture::Furniture, grid::Grid};
use crate::game;
use comfy::{
draw_rect, draw_rect_outline, draw_sprite, error, random_i32, vec2, EngineContext,
HashSet, Index, RandomRange as _, Vec2, GREEN, PURPLE, RED, WHITE
HashSet, RandomRange as _, Vec2, GREEN, PURPLE, RED, WHITE
};
use indexmap::IndexSet;

View file

@ -4,8 +4,8 @@ use crate::{
State
};
use comfy::{
draw_circle, draw_rect_outline, draw_sprite, error, info, is_key_down,
main_camera_mut, texture_id, vec2, EngineContext, IVec2, KeyCode, Vec2, RED, WHITE
draw_rect_outline, draw_sprite, error, info, is_key_down, main_camera_mut,
texture_id, vec2, EngineContext, IVec2, KeyCode, Vec2, RED, WHITE
};
use std::time::Instant;
use worldgen::MovementCost;