Skip to content

Commit 5186289

Browse files
author
sdubourg
committed
fix: example code
Just for the sake of accurateness so it can be copy-pasted as we love to do aha!
1 parent 136846f commit 5186289

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ Also it may be useful for some people who need it (including myself), with futur
99
# Basic Usage
1010

1111
```zig
12+
const std = @import("std");
1213
const String = @import("./zig-string.zig").String;
1314
// ...
1415
1516
// Use your favorite allocator
16-
var arena = ArenaAllocator.init(std.heap.page_allocator);
17+
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
1718
defer arena.deinit();
1819
1920
// Create your String
@@ -26,7 +27,7 @@ _ = myString.pop();
2627
try myString.concat(", World 🔥");
2728
2829
// Success!
29-
assert(myString.cmp("🔥 Hello, World 🔥"));
30+
std.debug.assert(myString.cmp("🔥 Hello, World 🔥"));
3031
3132
```
3233

0 commit comments

Comments
 (0)