diff options
author | Dave Gauer <ratfactor@gmail.com> | 2021-02-15 19:32:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-15 19:32:00 -0500 |
commit | 09fd739efa9cee151c8300f53c422d8a72766d49 (patch) | |
tree | 45f2eba30d72f43df60cd9b053ebaea5dfe11f18 /exercises/37_structs.zig | |
parent | 0d212ecf5a9de1c0bb673a2b6a409de5a99a9d7b (diff) | |
parent | 304489ca1f465b5456fa8c21dd0ae4e4c6c48617 (diff) | |
download | ziglings-09fd739efa9cee151c8300f53c422d8a72766d49.tar.gz ziglings-09fd739efa9cee151c8300f53c422d8a72766d49.tar.bz2 ziglings-09fd739efa9cee151c8300f53c422d8a72766d49.tar.xz ziglings-09fd739efa9cee151c8300f53c422d8a72766d49.zip |
Merge pull request #22 from quexxon/apply-zig-fmt
Apply `zig fmt` to exercises and generate remaining patch files
Diffstat (limited to 'exercises/37_structs.zig')
-rw-r--r-- | exercises/37_structs.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/exercises/37_structs.zig b/exercises/37_structs.zig index dd4b633..37989c0 100644 --- a/exercises/37_structs.zig +++ b/exercises/37_structs.zig @@ -23,7 +23,7 @@ const std = @import("std"); // We'll use an enum to specify the character class. -const Class = enum{ +const Class = enum { wizard, thief, bard, @@ -32,7 +32,7 @@ const Class = enum{ // Please add a new property to this struct called "health" and make // it a u8 integer type. -const Character = struct{ +const Character = struct { class: Class, gold: u32, experience: u32, @@ -41,8 +41,8 @@ const Character = struct{ pub fn main() void { // Please initialize Glorp with 100 health. var glorp_the_wise = Character{ - .class = Class.wizard, - .gold = 20, + .class = Class.wizard, + .gold = 20, .experience = 10, }; @@ -54,6 +54,6 @@ pub fn main() void { std.debug.print("Your wizard has {} health and {} gold.", .{ glorp_the_wise.health, - glorp_the_wise.gold + glorp_the_wise.gold, }); } |