mirror of
https://codeberg.org/ziglings/exercises.git
synced 2025-06-08 10:07:01 +09:00
removed unnecessary self pointer
This commit is contained in:
parent
f9b3d50824
commit
b409387dc8
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue