Skip to content

Commit 1f6d82e

Browse files
BratishkaErikVexu
authored andcommitted
std.cstr: remove deprecated namespace
Followup to 0a868da . Signed-off-by: Eric Joldasov <[email protected]>
1 parent 3a47bc7 commit 1f6d82e

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

lib/std/cstr.zig

-3
This file was deleted.

lib/std/std.zig

-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ pub const comptime_string_map = @import("comptime_string_map.zig");
8080
/// Cryptography.
8181
pub const crypto = @import("crypto.zig");
8282

83-
pub const cstr = @import("cstr.zig");
84-
8583
/// Debug printing, allocation and other debug helpers.
8684
pub const debug = @import("debug.zig");
8785

lib/std/zig/parser_test.zig

+6-6
Original file line numberDiff line numberDiff line change
@@ -2109,14 +2109,14 @@ test "zig fmt: multiline string parameter in fn call with trailing comma" {
21092109
try testCanonical(
21102110
\\fn foo() void {
21112111
\\ try stdout.print(
2112-
\\ \\ZIG_CMAKE_BINARY_DIR {}
2113-
\\ \\ZIG_C_HEADER_FILES {}
2114-
\\ \\ZIG_DIA_GUIDS_LIB {}
2112+
\\ \\ZIG_CMAKE_BINARY_DIR {s}
2113+
\\ \\ZIG_C_HEADER_FILES {s}
2114+
\\ \\ZIG_DIA_GUIDS_LIB {s}
21152115
\\ \\
21162116
\\ ,
2117-
\\ std.cstr.toSliceConst(c.ZIG_CMAKE_BINARY_DIR),
2118-
\\ std.cstr.toSliceConst(c.ZIG_CXX_COMPILER),
2119-
\\ std.cstr.toSliceConst(c.ZIG_DIA_GUIDS_LIB),
2117+
\\ std.mem.sliceTo(c.ZIG_CMAKE_BINARY_DIR, 0),
2118+
\\ std.mem.sliceTo(c.ZIG_CXX_COMPILER, 0),
2119+
\\ std.mem.sliceTo(c.ZIG_DIA_GUIDS_LIB, 0),
21202120
\\ );
21212121
\\}
21222122
\\

0 commit comments

Comments
 (0)