authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2020-05-18 17:03:02+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2020-05-18 17:10:06+02:00
log5186711a96197604ac824979027f46a0299d5e12
tree98f62c3ef526be9de3323031bac322c76acf630b
parentfae4af9e1cf0383a74da808678d9369553bd878b

Change to Self from *const Self/*Self where possible


1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/fs/wasi.zig+2-2
...@@ -117,7 +117,7 @@ pub const PreopenList = struct {...@@ -117,7 +117,7 @@ pub const PreopenList = struct {
117 /// TODO make the function more generic by searching by `PreopenType` union. This will117 /// TODO make the function more generic by searching by `PreopenType` union. This will
118 /// be needed in the future when WASI extends its capabilities to resources118 /// be needed in the future when WASI extends its capabilities to resources
119 /// other than preopened directories.119 /// other than preopened directories.
120 pub fn find(self: *const Self, path: []const u8) ?*const Preopen {120 pub fn find(self: Self, path: []const u8) ?*const Preopen {
121 for (self.buffer.items) |preopen| {121 for (self.buffer.items) |preopen| {
122 switch (preopen.@"type") {122 switch (preopen.@"type") {
123 PreopenType.Dir => |preopen_path| {123 PreopenType.Dir => |preopen_path| {
...@@ -129,7 +129,7 @@ pub const PreopenList = struct {...@@ -129,7 +129,7 @@ pub const PreopenList = struct {
129 }129 }
130130
131 /// Return the inner buffer as read-only slice.131 /// Return the inner buffer as read-only slice.
132 pub fn asSlice(self: *const Self) []const Preopen {132 pub fn asSlice(self: Self) []const Preopen {
133 return self.buffer.items;133 return self.buffer.items;
134 }134 }
135135