diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-05-29 03:22:52 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-05-29 03:22:52 -0400 |
| commit | cb042c8343eb94a8d149fe1f5d69aa2746aa85d0 (patch) | |
| tree | 36b9711c480b61c372c86bc47dd20a635d624d3a /std/array_list.zig | |
| parent | 7fa97b752e167de6df9a8a76999456d2c199b345 (diff) | |
| parent | eda6898c5b253367174172db909ee23013f32733 (diff) | |
| download | zig-cb042c8343eb94a8d149fe1f5d69aa2746aa85d0.tar.gz zig-cb042c8343eb94a8d149fe1f5d69aa2746aa85d0.zip | |
Merge remote-tracking branch 'origin/master' into llvm7
Diffstat (limited to 'std/array_list.zig')
| -rw-r--r-- | std/array_list.zig | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/std/array_list.zig b/std/array_list.zig index d1165c626d..679f7d73b8 100644 --- a/std/array_list.zig +++ b/std/array_list.zig @@ -150,7 +150,10 @@ pub fn AlignedArrayList(comptime T: type, comptime A: u29) type { }; pub fn iterator(self: &const Self) Iterator { - return Iterator { .list = self, .count = 0 }; + return Iterator{ + .list = self, + .count = 0, + }; } }; } @@ -207,7 +210,7 @@ test "iterator ArrayList test" { try list.append(2); try list.append(3); - var count : i32 = 0; + var count: i32 = 0; var it = list.iterator(); while (it.next()) |next| { assert(next == count + 1); @@ -225,7 +228,7 @@ test "iterator ArrayList test" { } it.reset(); - assert(?? it.next() == 1); + assert(??it.next() == 1); } test "insert ArrayList test" { |
