ziglings/patches/patches/075_quiz8.patch
Chris Boesch 7679f93f68 Converted var to const if there is no mutation in var.
This is checked from compiler version 0.12.0-dev.1664
2023-11-21 15:01:22 +01:00

15 lines
426 B
Diff

--- exercises/075_quiz8.zig 2023-11-21 14:48:15.440702720 +0100
+++ answers/075_quiz8.zig 2023-11-21 14:50:23.453311616 +0100
@@ -49,7 +49,11 @@
//
// Please fill in the body of this function!
fn makePath(from: *Place, to: *Place, dist: u8) Path {
-
+ return Path{
+ .from = from,
+ .to = to,
+ .dist = dist,
+ };
}
// Using our new function, these path definitions take up considerably less