diff options
Diffstat (limited to 'src/Config.zig')
| -rw-r--r-- | src/Config.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Config.zig b/src/Config.zig index ea11e5c..47e61a0 100644 --- a/src/Config.zig +++ b/src/Config.zig | |||
| @@ -68,7 +68,7 @@ fn readConfigInBaseDir(allocator: Allocator, config: *Config, base_dir: []const | |||
| 68 | while (try reader.readUntilDelimiterOrEofAlloc(allocator, '\n', 4096)) |line_buf| { | 68 | while (try reader.readUntilDelimiterOrEofAlloc(allocator, '\n', 4096)) |line_buf| { |
| 69 | defer allocator.free(line_buf); | 69 | defer allocator.free(line_buf); |
| 70 | 70 | ||
| 71 | var line = std.mem.trim(u8, line_buf, &std.ascii.spaces); | 71 | var line = std.mem.trim(u8, line_buf, &std.ascii.whitespace); |
| 72 | if (line.len == 0 or line[0] == '#') { | 72 | if (line.len == 0 or line[0] == '#') { |
| 73 | continue; | 73 | continue; |
| 74 | } | 74 | } |
| @@ -77,8 +77,8 @@ fn readConfigInBaseDir(allocator: Allocator, config: *Config, base_dir: []const | |||
| 77 | return error.MalformedConfig; | 77 | return error.MalformedConfig; |
| 78 | }; | 78 | }; |
| 79 | 79 | ||
| 80 | const key = std.mem.trimRight(u8, line[0..split], &std.ascii.spaces); | 80 | const key = std.mem.trimRight(u8, line[0..split], &std.ascii.whitespace); |
| 81 | const value = std.mem.trimLeft(u8, line[(split + 1)..], &std.ascii.spaces); | 81 | const value = std.mem.trimLeft(u8, line[(split + 1)..], &std.ascii.whitespace); |
| 82 | if (std.mem.eql(u8, key, "hard-tabs")) { | 82 | if (std.mem.eql(u8, key, "hard-tabs")) { |
| 83 | config.hard_tabs = try parseBool(value); | 83 | config.hard_tabs = try parseBool(value); |
| 84 | } else if (std.mem.eql(u8, key, "line-limit")) { | 84 | } else if (std.mem.eql(u8, key, "line-limit")) { |