mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 21:08:36 +00:00
fix: add specific error set for SelectiveWalker iterator function
This commit is contained in:
parent
4187d0e8fe
commit
1ebbdf8eef
@ -671,10 +671,12 @@ pub const SelectiveWalker = struct {
|
||||
name_buffer: std.ArrayListUnmanaged(u8),
|
||||
allocator: Allocator,
|
||||
|
||||
pub const Error = IteratorError || Allocator.Error;
|
||||
|
||||
/// After each call to this function, and on deinit(), the memory returned
|
||||
/// from this function becomes invalid. A copy must be made in order to keep
|
||||
/// a reference to the path.
|
||||
pub fn next(self: *SelectiveWalker) !?Walker.Entry {
|
||||
pub fn next(self: *SelectiveWalker) Error!?Walker.Entry {
|
||||
while (self.stack.items.len > 0) {
|
||||
const top = &self.stack.items[self.stack.items.len - 1];
|
||||
var dirname_len = top.dirname_len;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user