Skip to content

Commit 5b2bca1

Browse files
committed
Add zig v0.14 support
1 parent e5f30bc commit 5b2bca1

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<img align="right" width="160" height="160" src="https://user-images.githubusercontent.com/34946442/152222895-9c8adb22-a22d-4bce-a513-3486ca28bdd5.png"> zig**fsm** is a [finite state machine](https://en.wikipedia.org/wiki/Finite-state_machine) library for Zig.
22

3-
This library supports Zig 0.12.x, 0.13 as well as Zig master. Last test was on Zig version `0.14.0-dev.1912+9fd61f746`
3+
This library supports Zig 0.12.x, 0.13, 0.14 as well as Zig master. Last test was on Zig version `0.14.0-dev.3470+711b0fef5`
44

55
Use the zigfsm main branch to compile with Zig master. Use the appropriate zig-*version* tag to target a Zig version not compatible with the main branch.
66

build.zig.zon

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.{
2-
.name = "zigfsm",
2+
.name = .zigfsm,
33
.version = "0.2.0",
44
.paths = .{
55
"build.zig",
@@ -10,4 +10,5 @@
1010
"LICENSE",
1111
"README.md",
1212
},
13+
.fingerprint = 0x52e3d5c0b9b855f5,
1314
}

src/tests.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ const GameState = struct {
790790

791791
// Pops from the state stack and transitions to it. Returns true if stack had at least one state.
792792
pub fn undo(self: *GameState) !bool {
793-
if (self.stack.popOrNull()) |state| {
793+
if (self.stack.pop()) |state| {
794794
try self.fsm.transitionTo(state);
795795
return true;
796796
} else return false;

0 commit comments

Comments
 (0)