mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
switch to mem.span
Co-authored-by: erikarvstedt <36110478+erikarvstedt@users.noreply.github.com>
This commit is contained in:
parent
e9bd10cfda
commit
7a46c20a79
@ -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));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user