diff --git a/lib/std/mem.zig b/lib/std/mem.zig index f365ffe2e4..4cf879cf05 100644 --- a/lib/std/mem.zig +++ b/lib/std/mem.zig @@ -2201,7 +2201,7 @@ pub fn collapseRepeatsLen(comptime T: type, slice: []T, elem: T) usize { /// Collapse consecutive duplicate elements into one entry. pub fn collapseRepeats(comptime T: type, slice: []T, elem: T) []T { - return slice[0 .. collapseRepeatsLen(T, slice, elem)]; + return slice[0..collapseRepeatsLen(T, slice, elem)]; } fn testCollapseRepeats(str: []const u8, elem: u8, expected: []const u8) !void { diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig index 4bdbe64fbf..8e8351e446 100644 --- a/lib/std/os/windows.zig +++ b/lib/std/os/windows.zig @@ -1844,7 +1844,7 @@ pub fn sliceToPrefixedFileW(s: []const u8) !PathSpace { } fn getFullPathNameW(path: [*:0]const u16, out: []u16) !usize { - const result= kernel32.GetFullPathNameW(path, @intCast(u32, out.len), std.meta.assumeSentinel(out.ptr, 0), null); + const result = kernel32.GetFullPathNameW(path, @intCast(u32, out.len), std.meta.assumeSentinel(out.ptr, 0), null); if (result == 0) { switch (kernel32.GetLastError()) { else => |err| return unexpectedError(err), diff --git a/lib/std/x/os/net.zig b/lib/std/x/os/net.zig index 3d32019bb2..bbb2c105a7 100644 --- a/lib/std/x/os/net.zig +++ b/lib/std/x/os/net.zig @@ -17,10 +17,10 @@ const native_os = std.Target.current.os; /// an error if either resolution fails, or if the interface name is /// too long. pub fn resolveScopeID(name: []const u8) !u32 { - if (comptime @hasDecl(os, "IFNAMESIZE")) { + if (@hasDecl(os, "IFNAMESIZE")) { if (name.len >= os.IFNAMESIZE - 1) return error.NameTooLong; - if (comptime native_os.tag == .windows) { + if (native_os.tag == .windows) { var interface_name: [os.IFNAMESIZE]u8 = undefined; mem.copy(u8, &interface_name, name); interface_name[name.len] = 0;