Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b393e1369 |
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
# for Linux
|
# for Linux
|
||||||
[target.x86_64-unknown-linux-gnu]
|
[target.x86_64-unknown-linux-gnu]
|
||||||
linker = "clang"
|
linker = "clang"
|
||||||
rustflags = ["-C", "link-arg=-fuse-ld=/usr/bin/mold", "-Zshare-generics=y", "-D", "warnings", ]
|
rustflags = ["-C", "link-arg=-fuse-ld=/usr/bin/mold", "-Zshare-generics=y", ]
|
||||||
|
|
||||||
[unstable]
|
[unstable]
|
||||||
codegen-backend = true
|
codegen-backend = true
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ jobs:
|
|||||||
- name: Cache Rust dependencies and build artifacts
|
- name: Cache Rust dependencies and build artifacts
|
||||||
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
|
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
|
||||||
with:
|
with:
|
||||||
prefix-key: v1-rust
|
|
||||||
shared-key: linux-nightly
|
shared-key: linux-nightly
|
||||||
cache-bin: false
|
cache-bin: false
|
||||||
|
|
||||||
@@ -46,7 +45,7 @@ jobs:
|
|||||||
pkg-config
|
pkg-config
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --locked -j 4
|
run: RUSTFLAGS="-D warnings" cargo build --locked -j 4
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: cargo test --locked --lib -j 4
|
run: cargo test --locked --lib -j 4
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
use std::hash::Hasher;
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
CollisionContext, EnterContext, FighterStateImpl, InterruptContext, UpdateContext, ground, run,
|
CollisionContext, EnterContext, FighterStateImpl, InterruptContext, UpdateContext, ground, run,
|
||||||
wait, walk,
|
wait, walk,
|
||||||
@@ -9,12 +11,18 @@ use crate::fighter::state::fall::FallState;
|
|||||||
use crate::fighter::state::ground::{GroundedMotionResult, GroundedStateCommon};
|
use crate::fighter::state::ground::{GroundedMotionResult, GroundedStateCommon};
|
||||||
use crate::input::FighterCommands::{SmashMoveLeft, SmashMoveRight};
|
use crate::input::FighterCommands::{SmashMoveLeft, SmashMoveRight};
|
||||||
|
|
||||||
#[derive(Debug, Clone, Hash)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct DashState {
|
pub struct DashState {
|
||||||
direction: FighterFacingDirection,
|
direction: FighterFacingDirection,
|
||||||
pub ground_common: GroundedStateCommon,
|
pub ground_common: GroundedStateCommon,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl std::hash::Hash for DashState {
|
||||||
|
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||||
|
self.direction.hash(state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl DashState {
|
impl DashState {
|
||||||
pub fn new(direction: FighterFacingDirection, ground_common: GroundedStateCommon) -> Self {
|
pub fn new(direction: FighterFacingDirection, ground_common: GroundedStateCommon) -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
|||||||
Reference in New Issue
Block a user