From 7a46c20a79d9724787d55f3e496155bb5332151a Mon Sep 17 00:00:00 2001 From: xdBronch <51252236+xdBronch@users.noreply.github.com> Date: Sat, 2 Dec 2023 10:16:29 -0500 Subject: [PATCH] switch to mem.span Co-authored-by: erikarvstedt <36110478+erikarvstedt@users.noreply.github.com> --- lib/std/os/linux.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig index de9940b72c..597922e0c4 100644 --- a/lib/std/os/linux.zig +++ b/lib/std/os/linux.zig @@ -3621,7 +3621,7 @@ pub const inotify_event = extern struct { // returns `null` if the directory/file is the one being watched pub fn getName(self: *const inotify_event) ?[:0]const u8 { if (self.len == 0) return null; - return std.mem.sliceTo(@as([*:0]const u8, @ptrCast(self)) + @sizeOf(inotify_event), 0); + return std.mem.span(@as([*:0]const u8, @ptrCast(self)) + @sizeOf(inotify_event)); } };