| author | |
| committer | |
| log | 6950e4c2943d7eee1868aff1bf9e24f6bb310f60 |
| tree | b218b079cdf336eae55cb9622bff5192f76e7605 |
| parent | 278e5d398ea137a4c81bd00b1f40e50a16755684 |
3 files changed, 4 insertions(+), 4 deletions(-)
lib/std/mem.zig+1-1| ... | @@ -2201,7 +2201,7 @@ pub fn collapseRepeatsLen(comptime T: type, slice: []T, elem: T) usize { | ... | @@ -2201,7 +2201,7 @@ pub fn collapseRepeatsLen(comptime T: type, slice: []T, elem: T) usize { |
| 2201 | 2201 | ||
| 2202 | /// Collapse consecutive duplicate elements into one entry. | 2202 | /// Collapse consecutive duplicate elements into one entry. |
| 2203 | pub fn collapseRepeats(comptime T: type, slice: []T, elem: T) []T { | 2203 | pub fn collapseRepeats(comptime T: type, slice: []T, elem: T) []T { |
| 2204 | return slice[0 .. collapseRepeatsLen(T, slice, elem)]; | 2204 | return slice[0..collapseRepeatsLen(T, slice, elem)]; |
| 2205 | } | 2205 | } |
| 2206 | 2206 | ||
| 2207 | fn testCollapseRepeats(str: []const u8, elem: u8, expected: []const u8) !void { | 2207 | fn testCollapseRepeats(str: []const u8, elem: u8, expected: []const u8) !void { |
lib/std/os/windows.zig+1-1| ... | @@ -1844,7 +1844,7 @@ pub fn sliceToPrefixedFileW(s: []const u8) !PathSpace { | ... | @@ -1844,7 +1844,7 @@ pub fn sliceToPrefixedFileW(s: []const u8) !PathSpace { |
| 1844 | } | 1844 | } |
| 1845 | 1845 | ||
| 1846 | fn getFullPathNameW(path: [*:0]const u16, out: []u16) !usize { | 1846 | fn getFullPathNameW(path: [*:0]const u16, out: []u16) !usize { |
| 1847 | const result= kernel32.GetFullPathNameW(path, @intCast(u32, out.len), std.meta.assumeSentinel(out.ptr, 0), null); | 1847 | const result = kernel32.GetFullPathNameW(path, @intCast(u32, out.len), std.meta.assumeSentinel(out.ptr, 0), null); |
| 1848 | if (result == 0) { | 1848 | if (result == 0) { |
| 1849 | switch (kernel32.GetLastError()) { | 1849 | switch (kernel32.GetLastError()) { |
| 1850 | else => |err| return unexpectedError(err), | 1850 | else => |err| return unexpectedError(err), |
lib/std/x/os/net.zig+2-2| ... | @@ -17,10 +17,10 @@ const native_os = std.Target.current.os; | ... | @@ -17,10 +17,10 @@ const native_os = std.Target.current.os; |
| 17 | /// an error if either resolution fails, or if the interface name is | 17 | /// an error if either resolution fails, or if the interface name is |
| 18 | /// too long. | 18 | /// too long. |
| 19 | pub fn resolveScopeID(name: []const u8) !u32 { | 19 | pub fn resolveScopeID(name: []const u8) !u32 { |
| 20 | if (comptime @hasDecl(os, "IFNAMESIZE")) { | 20 | if (@hasDecl(os, "IFNAMESIZE")) { |
| 21 | if (name.len >= os.IFNAMESIZE - 1) return error.NameTooLong; | 21 | if (name.len >= os.IFNAMESIZE - 1) return error.NameTooLong; |
| 22 | 22 | ||
| 23 | if (comptime native_os.tag == .windows) { | 23 | if (native_os.tag == .windows) { |
| 24 | var interface_name: [os.IFNAMESIZE]u8 = undefined; | 24 | var interface_name: [os.IFNAMESIZE]u8 = undefined; |
| 25 | mem.copy(u8, &interface_name, name); | 25 | mem.copy(u8, &interface_name, name); |
| 26 | interface_name[name.len] = 0; | 26 | interface_name[name.len] = 0; |