Browse Source

removed unnecessary self pointer

Chris Boesch 2 years ago
parent
commit
b409387dc8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      exercises/047_methods.zig

+ 1 - 1
exercises/047_methods.zig

@@ -62,7 +62,7 @@ const HeatRay = struct {
     damage: u8,
 
     // We love this method:
-    pub fn zap(self: *HeatRay, alien: *Alien) void {
+    pub fn zap(self: HeatRay, alien: *Alien) void {
         alien.health -= if (self.damage >= alien.health) alien.health else self.damage;
     }
 };