diff options
| author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2024-09-20 10:19:26 +0000 |
|---|---|---|
| committer | Chris Boesch <chrboesch@noreply.codeberg.org> | 2024-09-20 10:19:26 +0000 |
| commit | 67c824118e3bf3f3aa3f236a1bc0b7c06bee373d (patch) | |
| tree | b40acd2e4de00700d119866411813f2dd8eb4212 /patches | |
| parent | 94b5b4bf4bd2cef9adcca401dc75d1b6cd079fb4 (diff) | |
| parent | d1b49f353eaa7358a4041a3090e87f49dc0a4bf6 (diff) | |
Merge pull request 'Minor improvements.' (#163) from patch_lbl_sw into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/163
Diffstat (limited to 'patches')
| -rw-r--r-- | patches/patches/108_labeled_switch.patch | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/patches/patches/108_labeled_switch.patch b/patches/patches/108_labeled_switch.patch index 467540c..fa9dd67 100644 --- a/patches/patches/108_labeled_switch.patch +++ b/patches/patches/108_labeled_switch.patch @@ -1,18 +1,18 @@ ---- a/exercises/108_labeled_switch.zig -+++ b/exercises/108_labeled_switch.zig -@@ -65,13 +65,13 @@ pub fn main() void { +--- exercises/108_labeled_switch.zig 2024-09-20 12:09:24.370066539 +0200 ++++ answers/108_labeled_switch.zig 2024-09-20 12:09:06.499711739 +0200 +@@ -65,13 +65,13 @@ // how would you fix it? - pr: switch (@as(PullRequestState, PullRequestState.Draft)) { + 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", .{}); + 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", .{}); + std.debug.print("The pull request has been merged.\n", .{}); } |
