diff options
| author | hryx <codroid@gmail.com> | 2019-05-27 17:24:21 -0700 |
|---|---|---|
| committer | hryx <codroid@gmail.com> | 2019-05-27 17:24:21 -0700 |
| commit | e1f3eec9cc05535b3f3b81f2fb7cd65dd4d1e841 (patch) | |
| tree | 5f408ed68a686491eaf759f9cbba02beac829b38 /std/buffer.zig | |
| parent | 2aa1c5da5dded6b1b346c3a1b57443f2c459ebe9 (diff) | |
| parent | 3fccc0747903f0726d6cc8ee73832cb62f1304bb (diff) | |
| download | zig-e1f3eec9cc05535b3f3b81f2fb7cd65dd4d1e841.tar.gz zig-e1f3eec9cc05535b3f3b81f2fb7cd65dd4d1e841.zip | |
Merge branch 'master' into translate-c-userland
Diffstat (limited to 'std/buffer.zig')
| -rw-r--r-- | std/buffer.zig | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/std/buffer.zig b/std/buffer.zig index 32228af558..bc6aa254da 100644 --- a/std/buffer.zig +++ b/std/buffer.zig @@ -139,15 +139,13 @@ pub const Buffer = struct { }; test "simple Buffer" { - const cstr = @import("cstr.zig"); - var buf = try Buffer.init(debug.global_allocator, ""); testing.expect(buf.len() == 0); try buf.append("hello"); try buf.append(" "); try buf.append("world"); testing.expect(buf.eql("hello world")); - testing.expect(mem.eql(u8, cstr.toSliceConst(buf.toSliceConst().ptr), buf.toSliceConst())); + testing.expect(mem.eql(u8, mem.toSliceConst(u8, buf.toSliceConst().ptr), buf.toSliceConst())); var buf2 = try Buffer.initFromBuffer(buf); testing.expect(buf.eql(buf2.toSliceConst())); |
