3 ms·
I agree that that is generally what Rust and the Rust stdlib try to do, but I don't think it holds in this case. Iterating through a directory generally yields
by tijsvd 6y ago
I agree that that is generally what Rust and the Rust stdlib try to do, but I don't think it holds in this case.
Iterating through a directory generally yields a Path or a DirEntry, both of which have a metadata method readily available, and neither will nudge you to open the file first and then calling metadata on the open file.