| ... | @@ -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 will | 117 | /// 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 resources | 118 | /// 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 | } |
| 130 | | 130 | |
| 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 | } |
| 135 | | 135 | |