From ff6e9a8599f5a1a4893357e7d5b5dc057be21bd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lex=20Rom=C3=A1n=20N=C3=BA=C3=B1ez?= Date: Tue, 15 Sep 2026 20:01:39 +0200 Subject: [PATCH 1/2] Stop using manual hashing for dash state --- src/fighter/state/dash.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/fighter/state/dash.rs b/src/fighter/state/dash.rs index 591ad82..fbad26f 100644 --- a/src/fighter/state/dash.rs +++ b/src/fighter/state/dash.rs @@ -11,18 +11,12 @@ use crate::fighter::state::fall::FallState; use crate::fighter::state::ground::{GroundedMotionResult, GroundedStateCommon}; use crate::input::FighterCommands::{SmashMoveLeft, SmashMoveRight}; -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Hash)] pub struct DashState { direction: FighterFacingDirection, pub ground_common: GroundedStateCommon, } -impl std::hash::Hash for DashState { - fn hash(&self, state: &mut H) { - self.direction.hash(state); - } -} - impl DashState { pub fn new(direction: FighterFacingDirection, ground_common: GroundedStateCommon) -> Self { Self { -- 2.54.0 From 4180882af58f0d4a0f2d97d29a49df201233744a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lex=20Rom=C3=A1n=20N=C3=BA=C3=B1ez?= Date: Tue, 15 Sep 2026 20:13:45 +0200 Subject: [PATCH 2/2] Fix Rust CI cache reuse --- .cargo/config.toml | 4 ++-- .gitea/workflows/ci.yml | 3 ++- src/fighter/state/dash.rs | 2 -- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 8e4313f..1d36eff 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,7 +1,7 @@ # for Linux [target.x86_64-unknown-linux-gnu] linker = "clang" -rustflags = ["-C", "link-arg=-fuse-ld=/usr/bin/mold", "-Zshare-generics=y", ] +rustflags = ["-C", "link-arg=-fuse-ld=/usr/bin/mold", "-Zshare-generics=y", "-D", "warnings", ] [unstable] codegen-backend = true @@ -10,4 +10,4 @@ codegen-backend = true codegen-backend = "llvm" [profile.dev.package."*"] -codegen-backend = "llvm" \ No newline at end of file +codegen-backend = "llvm" diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index ef57c78..87ec3a0 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -25,6 +25,7 @@ jobs: - name: Cache Rust dependencies and build artifacts uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2 with: + prefix-key: v1-rust shared-key: linux-nightly cache-bin: false @@ -45,7 +46,7 @@ jobs: pkg-config - name: Build - run: RUSTFLAGS="-D warnings" cargo build --locked -j 4 + run: cargo build --locked -j 4 - name: Run unit tests run: cargo test --locked --lib -j 4 diff --git a/src/fighter/state/dash.rs b/src/fighter/state/dash.rs index fbad26f..61eb325 100644 --- a/src/fighter/state/dash.rs +++ b/src/fighter/state/dash.rs @@ -1,5 +1,3 @@ -use std::hash::Hasher; - use super::{ CollisionContext, EnterContext, FighterStateImpl, InterruptContext, UpdateContext, ground, run, wait, walk, -- 2.54.0