From fea73e898bc46acc0adb432da48461eb956dd69a Mon Sep 17 00:00:00 2001 From: SinuS Von SifriduS Date: Wed, 16 Sep 2026 11:41:14 +0200 Subject: [PATCH] 0.1.0-0-pre.11-fix.2 --- Cargo.toml | 4 +- .../games/game-snake-poc/unit_tests/state.rs | 4 +- deltas/0.1.0/0-pre.11.fix.2.md | 56 +++++++++++++++++++ 3 files changed, 60 insertions(+), 4 deletions(-) create mode 100644 deltas/0.1.0/0-pre.11.fix.2.md diff --git a/Cargo.toml b/Cargo.toml index 3dc5493..b33ccf9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ # file: Cargo.toml -# version: 22 +# version: 23 [workspace] resolver = "3" @@ -17,7 +17,7 @@ members = [ ] [workspace.package] -version = "0.1.0-0-pre.11.fix.1" +version = "0.1.0-0-pre.11.fix.2" edition = "2024" license = "MIT" repository = "https://git.sasedev.com/Sasedev/games" diff --git a/crates/games/game-snake-poc/unit_tests/state.rs b/crates/games/game-snake-poc/unit_tests/state.rs index cf0c3cc..02b062f 100644 --- a/crates/games/game-snake-poc/unit_tests/state.rs +++ b/crates/games/game-snake-poc/unit_tests/state.rs @@ -1,5 +1,5 @@ // file: crates/games/game-snake-poc/unit_tests/state.rs -// version: 2 +// version: 3 fn frame(index: u64) -> engine_v1_common::EngineFrame { return engine_v1_common::EngineFrame::new(index, std::time::Duration::from_millis(16), std::time::Duration::ZERO); @@ -36,7 +36,7 @@ fn scene_contains_food_and_snake_segments() { game_logging_lib::with_test_tracing("scene_contains_food_and_snake_segments", || { let state = crate::SnakeState::new(); let scene = engine_v1_common::EngineGame::scene(&state); - let occupied = scene.rectangles().iter().filter(|slot| slot.is_some()).count(); + let occupied = scene.rectangles().iter().filter(|slot| return slot.is_some()).count(); assert_eq!(occupied, state.length() + 1); }); } diff --git a/deltas/0.1.0/0-pre.11.fix.2.md b/deltas/0.1.0/0-pre.11.fix.2.md new file mode 100644 index 0000000..20c8f73 --- /dev/null +++ b/deltas/0.1.0/0-pre.11.fix.2.md @@ -0,0 +1,56 @@ + + + +# Delta 0.1.0-0-pre.11.fix.2 + +## Base + +Base déclarée : `0.1.0-0-pre.11.fix.1`, non validée. + +## Échec observé + +Les tests Snake passent, mais Clippy strict bloque encore sur une closure de test : + +```text +clippy::implicit-return +``` + +Code concerné : + +```text +filter(|slot| slot.is_some()) +``` + +## Correctif + +La closure respecte désormais la règle workspace exigeant un `return` explicite : + +```text +filter(|slot| return slot.is_some()) +``` + +Aucun comportement fonctionnel n'est modifié. + +## Validation + +```bash +cargo fmt --all +cargo fmt --all -- --check + +python3 scripts/audit_rust_workspace_rules.py +python3 scripts/audit_markdown_tables.py README.md RULES.md ROADMAP.md CHANGELOG.md docs prompts crates Android deltas history + +cargo check --workspace +cargo clippy --workspace --all-targets --all-features -- -D warnings + +cargo test -p engine-v1-sdl --all-targets --all-features +cargo test -p game-snake-poc --all-targets --all-features +``` + +Puis reprendre les smokes Desktop et Android définis dans `0-pre.11`. + +## Transition + +Si toutes les gates passent, `0.1.0-0-pre.11.fix.2` valide la fin de la phase `0-pre.*`. + +En cas d'échec imputable au projet, produire `0.1.0-0-pre.11.fix.3`.