Skip to content

Commit 94e5776

Browse files
committed
Update version to 0.9.0 and minimum Zig version to 0.15.1; refactor build configuration and array list initialization
1 parent 4bc8683 commit 94e5776

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

build.zig

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@ pub fn build(b: *std.Build) void {
44
const target = b.standardTargetOptions(.{});
55
const optimize = b.standardOptimizeOption(.{});
66

7-
_ = b.addModule("env_struct", .{
7+
const env_struct = b.addModule("env_struct", .{
88
.root_source_file = b.path("src/env_struct.zig"),
99
.target = target,
1010
.optimize = optimize,
1111
});
1212

1313
const lib_unit_tests = b.addTest(.{
14-
.root_source_file = b.path("src/env_struct.zig"),
15-
.target = target,
16-
.optimize = optimize,
14+
.root_module = env_struct,
1715
});
1816

1917
const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests);

build.zig.zon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// This is a [Semantic Version](https://semver.org/).
1212
// In a future version of Zig it will be used for package deduplication.
13-
.version = "0.8.0",
13+
.version = "0.9.0",
1414

1515
// Together with name, this represents a globally unique package
1616
// identifier. This field is generated by the Zig toolchain when the
@@ -28,7 +28,7 @@
2828

2929
// Tracks the earliest Zig version that the package considers to be a
3030
// supported use case.
31-
.minimum_zig_version = "0.14.1",
31+
.minimum_zig_version = "0.15.1",
3232

3333
// This field is optional.
3434
// Each dependency must either provide a `url` and `hash`, or a `path`.

src/env_struct.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ fn parseEnum(comptime E: type) fn ([]const u8, std.mem.Allocator) anyerror!E {
287287
fn parseStringArray(raw: []const u8, allocator: std.mem.Allocator) ![][]const u8 {
288288
if (raw.len == 0) return &[_][]const u8{};
289289

290-
var result = std.ArrayList([]const u8).init(allocator);
290+
var result = std.array_list.Managed([]const u8).init(allocator);
291291
defer result.deinit();
292292

293293
var iter = std.mem.splitScalar(u8, raw, ',');

0 commit comments

Comments
 (0)