aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDave Gauer <dave@ratfactor.com>2021-06-30 19:28:27 -0400
committerDave Gauer <dave@ratfactor.com>2021-06-30 19:28:27 -0400
commit76287cad45b8db6db6a296168e8112b22c0d3f59 (patch)
tree8150d7a7cb60d848a85f8874d5706a567a78c241
parent290ba908ec39c38fe4b96f4cbfe6eef7158b0f20 (diff)
no unused method params
-rw-r--r--exercises/070_comptime5.zig4
-rw-r--r--patches/patches/070_comptime5.patch2
2 files changed, 5 insertions, 1 deletions
diff --git a/exercises/070_comptime5.zig b/exercises/070_comptime5.zig
index 89367bd..714bf1c 100644
--- a/exercises/070_comptime5.zig
+++ b/exercises/070_comptime5.zig
@@ -50,12 +50,16 @@ const RubberDuck = struct {
}
fn quack(self: RubberDuck) void {
+ // Assigning an expression to '_' allows us to safely
+ // "use" the value while also ignoring it.
+ _ = self;
print("\"Squeek!\" ", .{});
}
fn listen(self: RubberDuck, dev_talk: []const u8) void {
// Listen to developer talk about programming problem.
// Silently contemplate problem. Emit helpful sound.
+ _ = dev_talk;
self.quack();
}
};
diff --git a/patches/patches/070_comptime5.patch b/patches/patches/070_comptime5.patch
index 394d9f1..c92dcc7 100644
--- a/patches/patches/070_comptime5.patch
+++ b/patches/patches/070_comptime5.patch
@@ -1,4 +1,4 @@
-122,123c122,123
+126,127c126,127
< const walks_like_duck = ???;
< const quacks_like_duck = ???;
---