Skip to content

Commit

Permalink
Fix SplitIterator and TokenIterator type instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
squeek502 committed May 6, 2023
1 parent 19aea1d commit e96c07c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3531,7 +3531,7 @@ fn serveUpdateResults(s: *Server, comp: *Compilation) !void {
}

const ModuleDepIterator = struct {
split: mem.SplitIterator(u8),
split: mem.SplitIterator(u8, .scalar),

fn init(deps_str: []const u8) ModuleDepIterator {
return .{ .split = mem.split(u8, deps_str, ",") };
Expand Down
4 changes: 2 additions & 2 deletions test/src/Cases.zig
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ const TestManifest = struct {
};

const TrailingIterator = struct {
inner: std.mem.TokenIterator(u8),
inner: std.mem.TokenIterator(u8, .any),

fn next(self: *TrailingIterator) ?[]const u8 {
const next_inner = self.inner.next() orelse return null;
Expand All @@ -805,7 +805,7 @@ const TestManifest = struct {

fn ConfigValueIterator(comptime T: type) type {
return struct {
inner: std.mem.SplitIterator(u8),
inner: std.mem.SplitIterator(u8, .scalar),

fn next(self: *@This()) !?T {
const next_raw = self.inner.next() orelse return null;
Expand Down

0 comments on commit e96c07c

Please sign in to comment.