diff options
author | Dave Gauer <dave@ratfactor.com> | 2021-06-30 19:55:18 -0400 |
---|---|---|
committer | Dave Gauer <dave@ratfactor.com> | 2021-06-30 19:55:18 -0400 |
commit | cc5c413cfcad8efe8540a6d6a8afe9d80d86a273 (patch) | |
tree | fe81b139f5c46f93b8ebe3b55f36d3c99d6de81d /exercises/075_quiz8.zig | |
parent | 7b37431b6bb5143dc82f1b1b95a3d5073e289404 (diff) | |
download | ziglings-cc5c413cfcad8efe8540a6d6a8afe9d80d86a273.tar.gz ziglings-cc5c413cfcad8efe8540a6d6a8afe9d80d86a273.tar.bz2 ziglings-cc5c413cfcad8efe8540a6d6a8afe9d80d86a273.tar.xz ziglings-cc5c413cfcad8efe8540a6d6a8afe9d80d86a273.zip |
methods not namespaced
Diffstat (limited to 'exercises/075_quiz8.zig')
-rw-r--r-- | exercises/075_quiz8.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/exercises/075_quiz8.zig b/exercises/075_quiz8.zig index 14fab18..ff5e569 100644 --- a/exercises/075_quiz8.zig +++ b/exercises/075_quiz8.zig @@ -81,7 +81,7 @@ const TripItem = union(enum) { place: *const Place, path: *const Path, - fn print(self: TripItem) void { + fn printMe(self: TripItem) void { switch (self) { .place => |p| print("{s}", .{p.name}), .path => |p| print("--{}->", .{p.dist}), @@ -201,7 +201,7 @@ fn printTrip(trip: []?TripItem) void { while (i > 0) { i -= 1; if (trip[i] == null) continue; - trip[i].?.print(); + trip[i].?.printMe(); } print("\n", .{}); |