mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-08 07:50:00 +00:00
no unused method params
This commit is contained in:
@@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user