Browse Source

Merge pull request 'Use print alias in exercise 100_for4.zig' (#198) from Zorgatone/ziglings-solutions:use-print-alias into main

Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/198
Chris Boesch 7 months ago
parent
commit
fabedb4a24
2 changed files with 3 additions and 3 deletions
  1. 2 2
      exercises/100_for4.zig
  2. 1 1
      patches/patches/100_for4.patch

+ 2 - 2
exercises/100_for4.zig

@@ -41,12 +41,12 @@ pub fn main() void {
 
 
     for (hex_nums, ???) |hn, ???| {
     for (hex_nums, ???) |hn, ???| {
         if (hn != dn) {
         if (hn != dn) {
-            std.debug.print("Uh oh! Found a mismatch: {d} vs {d}\n", .{ hn, dn });
+            print("Uh oh! Found a mismatch: {d} vs {d}\n", .{ hn, dn });
             return;
             return;
         }
         }
     }
     }
 
 
-    std.debug.print("Arrays match!\n", .{});
+    print("Arrays match!\n", .{});
 }
 }
 //
 //
 // You are perhaps wondering what happens if one of the two lists
 // You are perhaps wondering what happens if one of the two lists

+ 1 - 1
patches/patches/100_for4.patch

@@ -7,5 +7,5 @@
 -    for (hex_nums, ???) |hn, ???| {
 -    for (hex_nums, ???) |hn, ???| {
 +    for (hex_nums, dec_nums) |hn, dn| {
 +    for (hex_nums, dec_nums) |hn, dn| {
          if (hn != dn) {
          if (hn != dn) {
-             std.debug.print("Uh oh! Found a mismatch: {d} vs {d}\n", .{ hn, dn });
+             print("Uh oh! Found a mismatch: {d} vs {d}\n", .{ hn, dn });
              return;
              return;