From a7736f7d80603ccc44370f37941fb6c66fa918cb Mon Sep 17 00:00:00 2001 From: Roman Frołow Date: Thu, 13 May 2021 13:25:29 +0200 Subject: Prevent error "cast discards const qualifier" --- exercises/047_methods.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/047_methods.zig b/exercises/047_methods.zig index c8e5c17..dcc3e13 100644 --- a/exercises/047_methods.zig +++ b/exercises/047_methods.zig @@ -32,7 +32,7 @@ // with the "dot syntax", the instance will be automatically // passed as the "self" parameter: // -// const my_bar = Bar{ .number = 2000 }; +// var my_bar = Bar{ .number = 2000 }; // my_bar.printMe(); // prints "2000" // // Okay, you're armed. -- cgit v1.2.3-ZIG From e17159bceadaf54a4eba899973bddcd093ada3ed Mon Sep 17 00:00:00 2001 From: Roman Frołow Date: Thu, 13 May 2021 14:01:54 +0200 Subject: this means --- exercises/049_quiz6.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/049_quiz6.zig b/exercises/049_quiz6.zig index b01a091..92541a5 100644 --- a/exercises/049_quiz6.zig +++ b/exercises/049_quiz6.zig @@ -17,7 +17,7 @@ const Elephant = struct { // Elephant tail methods! pub fn getTail(self: *Elephant) *Elephant { - return self.tail.?; // Remember, this is means "orelse unreachable" + return self.tail.?; // Remember, this means "orelse unreachable" } pub fn hasTail(self: *Elephant) bool { -- cgit v1.2.3-ZIG