Replace &Path with impl AsRef<Path>. It allows to pass into functions different string types without explicit conversion.
Add lazy versions of public functions where it's possible. New functions return iterator over items instead of allocated vector with items. It allows to get info without unnecessary allocation. Old functions are still here for backward compatibility.
Remove unnecessary temporary allocations in implementations.
Remove unnecessary cloning
Remove duplication in code, move similar parts to functions and methods
Refactor code in functional style with iters and result/option methods. As for me it's more clear and concise.
&Path
withimpl AsRef<Path>
. It allows to pass into functions different string types without explicit conversion.