mirror of
https://git.aramjonghu.dev/AramJonghu/ziglings.git
synced 2026-09-01 08:03:29 +02:00
Rephrase instruction for clarity
This commit is contained in:
@@ -190,7 +190,7 @@ const TripItem = union(enum) {
|
||||
fn printMe(self: TripItem) void {
|
||||
switch (self) {
|
||||
// Oops! The hermit forgot how to capture the union values
|
||||
// in a switch statement. Please capture both values as
|
||||
// in a switch statement. Please capture each value as
|
||||
// 'p' so the print statements work!
|
||||
.place => print("{s}", .{p.name}),
|
||||
.path => print("--{}->", .{p.dist}),
|
||||
|
||||
Reference in New Issue
Block a user