| ... | @@ -457,3 +457,9 @@ pub fn readFile(dir: std.fs.Dir, sub_path: string, alloc: std.mem.Allocator) !st | ... | @@ -457,3 +457,9 @@ pub fn readFile(dir: std.fs.Dir, sub_path: string, alloc: std.mem.Allocator) !st |
| 457 | pipe(file.reader(), buffer.writer()) catch @panic("unreachable"); // did the filesystem lie? | 457 | pipe(file.reader(), buffer.writer()) catch @panic("unreachable"); // did the filesystem lie? |
| 458 | return buffer.items; | 458 | return buffer.items; |
| 459 | } | 459 | } |
| | 460 | |
| | 461 | pub fn nullifyS(s: ?string) ?string { |
| | 462 | if (s == null) return null; |
| | 463 | if (s.?.len == 0) return null; |
| | 464 | return s.?; |
| | 465 | } |