Skip to content

Commit 2537756

Browse files
committed
Remove some un-needed mem.toSliceConst operations
1 parent 25905f2 commit 2537756

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src-self-hosted/main.zig

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ async fn fmtPath(fmt: *Fmt, file_path_ref: []const u8, check_mode: bool) FmtErro
792792
}
793793

794794
fn cmdVersion(allocator: *Allocator, args: []const []const u8) !void {
795-
try stdout.print("{}\n", .{std.mem.toSliceConst(u8, c.ZIG_VERSION_STRING)});
795+
try stdout.print("{}\n", .{c.ZIG_VERSION_STRING});
796796
}
797797

798798
fn cmdHelp(allocator: *Allocator, args: []const []const u8) !void {
@@ -863,12 +863,12 @@ fn cmdInternalBuildInfo(allocator: *Allocator, args: []const []const u8) !void {
863863
\\ZIG_DIA_GUIDS_LIB {}
864864
\\
865865
, .{
866-
std.mem.toSliceConst(u8, c.ZIG_CMAKE_BINARY_DIR),
867-
std.mem.toSliceConst(u8, c.ZIG_CXX_COMPILER),
868-
std.mem.toSliceConst(u8, c.ZIG_LLD_INCLUDE_PATH),
869-
std.mem.toSliceConst(u8, c.ZIG_LLD_LIBRARIES),
870-
std.mem.toSliceConst(u8, c.ZIG_LLVM_CONFIG_EXE),
871-
std.mem.toSliceConst(u8, c.ZIG_DIA_GUIDS_LIB),
866+
c.ZIG_CMAKE_BINARY_DIR,
867+
c.ZIG_CXX_COMPILER,
868+
c.ZIG_LLD_INCLUDE_PATH,
869+
c.ZIG_LLD_LIBRARIES,
870+
c.ZIG_LLVM_CONFIG_EXE,
871+
c.ZIG_DIA_GUIDS_LIB,
872872
});
873873
}
874874

test/stage1/behavior/misc.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ test "string concatenation" {
365365
comptime expect(@TypeOf(a) == *const [12:0]u8);
366366
comptime expect(@TypeOf(b) == *const [12:0]u8);
367367

368-
const len = mem.len(u8, b);
368+
const len = b.len;
369369
const len_with_null = len + 1;
370370
{
371371
var i: u32 = 0;

0 commit comments

Comments
 (0)