From 240fbcb1df9a89be88ded6d0a8130f0e955be87e Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Thu, 1 Dec 2022 13:23:09 -0400 Subject: [PATCH] chore: update dependencies --- lib/zig-clap | 2 +- lib/zig-toml | 2 +- src/config.zig | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/zig-clap b/lib/zig-clap index dbc6b8e..a1b01ff 160000 --- a/lib/zig-clap +++ b/lib/zig-clap @@ -1 +1 @@ -Subproject commit dbc6b8e54ad753b0605feaeecc8e79dba3572ed3 +Subproject commit a1b01ffeab452790790034b8a0e97aa30bbeb800 diff --git a/lib/zig-toml b/lib/zig-toml index 3cc4bb6..016b8bc 160000 --- a/lib/zig-toml +++ b/lib/zig-toml @@ -1 +1 @@ -Subproject commit 3cc4bb6dfba885de2c2d6f7c5ee6bc68a5be02bf +Subproject commit 016b8bcf98e50ae9408f6a9606bbec5a9bc6f677 diff --git a/src/config.zig b/src/config.zig index e932a6b..329d65d 100644 --- a/src/config.zig +++ b/src/config.zig @@ -58,7 +58,10 @@ pub fn load(allocator: Allocator, file_path: []const u8) !void { const contents = try config_file.readToEndAlloc(allocator, try config_file.getEndPos()); defer allocator.free(contents); - const table = try toml.parseContents(allocator, contents, null); + var parser = try toml.parseFile(allocator, file_path); + defer parser.deinit(); + + const table = try parser.parse(); defer table.deinit(); // TODO: Report unknown config options