Skip to content

Commit

Permalink
switch to mem.span
Browse files Browse the repository at this point in the history
Co-authored-by: erikarvstedt <36110478+erikarvstedt@users.noreply.github.com>
  • Loading branch information
2 people authored and Vexu committed Dec 8, 2023
1 parent e9bd10c commit 7a46c20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/std/os/linux.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
};

Expand Down

0 comments on commit 7a46c20

Please sign in to comment.