mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-11 17:39:58 +00:00
Insert space for additional async exercises
This commit is contained in:
18
patches/patches/111_labeled_switch.patch
Normal file
18
patches/patches/111_labeled_switch.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
--- exercises/111_labeled_switch.zig 2025-08-15 15:17:57.840348083 +0200
|
||||
+++ answers/111_labeled_switch.zig 2026-04-02 10:51:15.817831773 +0200
|
||||
@@ -67,13 +67,13 @@
|
||||
// how would you fix it?
|
||||
pr: switch (PullRequestState.Draft) {
|
||||
PullRequestState.Draft => continue :pr PullRequestState.InReview,
|
||||
- PullRequestState.InReview => continue :pr PullRequestState.Rejected,
|
||||
+ PullRequestState.InReview => continue :pr PullRequestState.Approved,
|
||||
PullRequestState.Approved => continue :pr PullRequestState.Merged,
|
||||
PullRequestState.Rejected => {
|
||||
std.debug.print("The pull request has been rejected.\n", .{});
|
||||
return;
|
||||
},
|
||||
- PullRequestState.Merged => break, // Would you know where to break to?
|
||||
+ PullRequestState.Merged => break :pr, // Would you know where to break to?
|
||||
}
|
||||
std.debug.print("The pull request has been merged.\n", .{});
|
||||
}
|
||||
Reference in New Issue
Block a user