Closed AndyGauge closed 7 years ago
For Iterator::next(), I'm not sure if Errors need to be publicly part of the API because the Error case that I can see (calling unwrap() on a None) should be handled by calling is_empty()
on the stack_list. Because the stack_list is not empty, last_mut() should always return a value and therefore the error should probably be handled within the method. (Andy's 2 cents)
ping @BurntSushi
For Iterator::next(), I'm not sure if Errors need to be publicly part of the API because the Error case that I can see (calling unwrap() on a None) should be handled by calling is_empty() on the stack_list. Because the stack_list is not empty, last_mut() should always return a value and therefore the error should probably be handled within the method. (Andy's 2 cents)
I don't think I understand this. The error isn't something that walkdir
itself can handle. All it can do is pass it along to the caller so that they can handle it.
Otherwise, this PR looks great. Thanks @AndyGauge!
for
Iter
(Iterator::next()
),FilterEntry
(Iterator::next()
), andDirEntry::metadata()
For #24