methods not namespaced

This commit is contained in:
Dave Gauer 2021-06-30 19:55:18 -04:00
parent c7b00fd83c
commit 6157066b95

View file

@ -81,7 +81,7 @@ const TripItem = union(enum) {
place: *const Place, place: *const Place,
path: *const Path, path: *const Path,
fn print(self: TripItem) void { fn printMe(self: TripItem) void {
switch (self) { switch (self) {
.place => |p| print("{s}", .{p.name}), .place => |p| print("{s}", .{p.name}),
.path => |p| print("--{}->", .{p.dist}), .path => |p| print("--{}->", .{p.dist}),
@ -201,7 +201,7 @@ fn printTrip(trip: []?TripItem) void {
while (i > 0) { while (i > 0) {
i -= 1; i -= 1;
if (trip[i] == null) continue; if (trip[i] == null) continue;
trip[i].?.print(); trip[i].?.printMe();
} }
print("\n", .{}); print("\n", .{});