Commit 6950e4c294
Changed files (3)
lib
std
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),
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;
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 {