summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
Diffstat (limited to 'patches')
-rw-r--r--patches/patches/084_async.patch11
-rw-r--r--patches/patches/085_async2.patch10
-rw-r--r--patches/patches/086_async3.patch16
-rw-r--r--patches/patches/087_async4.patch21
-rw-r--r--patches/patches/088_async5.patch11
-rw-r--r--patches/patches/089_async6.patch13
-rw-r--r--patches/patches/090_async7.patch11
-rw-r--r--patches/patches/091_async8.patch26
8 files changed, 0 insertions, 119 deletions
diff --git a/patches/patches/084_async.patch b/patches/patches/084_async.patch
deleted file mode 100644
index 11a9da0..0000000
--- a/patches/patches/084_async.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- exercises/084_async.zig 2023-10-03 22:15:22.125574535 +0200
-+++ answers/084_async.zig 2023-10-05 20:04:07.219436606 +0200
-@@ -48,7 +48,7 @@
- pub fn main() void {
- // Additional Hint: you can assign things to '_' when you
- // don't intend to do anything with them.
-- foo();
-+ _ = async foo();
- }
-
- fn foo() void {
diff --git a/patches/patches/085_async2.patch b/patches/patches/085_async2.patch
deleted file mode 100644
index ba10b05..0000000
--- a/patches/patches/085_async2.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- exercises/085_async2.zig 2023-10-03 22:15:22.125574535 +0200
-+++ answers/085_async2.zig 2023-10-05 20:04:07.226103397 +0200
-@@ -19,6 +19,7 @@
-
- pub fn main() void {
- var foo_frame = async foo();
-+ resume foo_frame;
- }
-
- fn foo() void {
diff --git a/patches/patches/086_async3.patch b/patches/patches/086_async3.patch
deleted file mode 100644
index d80d4a1..0000000
--- a/patches/patches/086_async3.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- exercises/086_async3.zig 2023-10-03 22:15:22.125574535 +0200
-+++ answers/086_async3.zig 2023-10-05 20:04:07.229436793 +0200
-@@ -13,7 +13,12 @@
- const n = 5;
- var foo_frame = async foo(n);
-
-- ???
-+ // Silly solution. You can also use a loop.
-+ resume foo_frame;
-+ resume foo_frame;
-+ resume foo_frame;
-+ resume foo_frame;
-+ resume foo_frame;
-
- print("\n", .{});
- }
diff --git a/patches/patches/087_async4.patch b/patches/patches/087_async4.patch
deleted file mode 100644
index b1c1736..0000000
--- a/patches/patches/087_async4.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- exercises/087_async4.zig 2023-10-03 22:15:22.125574535 +0200
-+++ answers/087_async4.zig 2023-10-05 20:04:07.236103584 +0200
-@@ -16,7 +16,7 @@
-
- while (global_counter <= 5) {
- print("{} ", .{global_counter});
-- ???
-+ resume foo_frame;
- }
-
- print("\n", .{});
-@@ -24,7 +24,7 @@
-
- fn foo() void {
- while (true) {
-- ???
-- ???
-+ global_counter += 1;
-+ suspend {}
- }
- }
diff --git a/patches/patches/088_async5.patch b/patches/patches/088_async5.patch
deleted file mode 100644
index b9d5a21..0000000
--- a/patches/patches/088_async5.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- exercises/088_async5.zig 2023-10-03 22:15:22.125574535 +0200
-+++ answers/088_async5.zig 2023-10-05 20:04:07.239436980 +0200
-@@ -36,7 +36,7 @@
- pub fn main() void {
- var myframe = async getPageTitle("http://example.com");
-
-- var value = ???
-+ var value = await myframe;
-
- print("{s}\n", .{value});
- }
diff --git a/patches/patches/089_async6.patch b/patches/patches/089_async6.patch
deleted file mode 100644
index 4a0687e..0000000
--- a/patches/patches/089_async6.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- exercises/089_async6.zig 2023-10-03 22:15:22.125574535 +0200
-+++ answers/089_async6.zig 2023-10-05 20:04:07.242770376 +0200
-@@ -41,8 +41,8 @@
- var com_frame = async getPageTitle("http://example.com");
- var org_frame = async getPageTitle("http://example.org");
-
-- var com_title = com_frame;
-- var org_title = org_frame;
-+ var com_title = await com_frame;
-+ var org_title = await org_frame;
-
- print(".com: {s}, .org: {s}.\n", .{ com_title, org_title });
- }
diff --git a/patches/patches/090_async7.patch b/patches/patches/090_async7.patch
deleted file mode 100644
index 62ec057..0000000
--- a/patches/patches/090_async7.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- exercises/090_async7.zig 2023-10-03 22:15:22.125574535 +0200
-+++ answers/090_async7.zig 2023-10-05 20:04:07.249437167 +0200
-@@ -29,7 +29,7 @@
- // The main() function can not be async. But we know
- // getBeef() will not suspend with this particular
- // invocation. Please make this okay:
-- var my_beef = getBeef(0);
-+ var my_beef = nosuspend getBeef(0);
-
- print("beef? {X}!\n", .{my_beef});
- }
diff --git a/patches/patches/091_async8.patch b/patches/patches/091_async8.patch
deleted file mode 100644
index ddd3fce..0000000
--- a/patches/patches/091_async8.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- exercises/091_async8.zig 2023-10-03 22:15:22.125574535 +0200
-+++ answers/091_async8.zig 2023-10-05 20:04:07.252770563 +0200
-@@ -17,7 +17,7 @@
-
- var frame = async suspendable();
-
-- print("X", .{});
-+ print("D", .{});
-
- resume frame;
-
-@@ -25,11 +25,11 @@
- }
-
- fn suspendable() void {
-- print("X", .{});
-+ print("B", .{});
-
- suspend {
-- print("X", .{});
-+ print("C", .{});
- }
-
-- print("X", .{});
-+ print("E", .{});
- }