mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
[PR #13] [MERGED] Rewrite to use walkdir instead of recursion #253
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/bootandy/dust/pull/13
Author: @bootandy
Created: 4/23/2018
Status: ✅ Merged
Merged: 4/24/2018
Merged by: @bootandy
Base:
master← Head:walkdir2📝 Commits (2)
24c97efRewrite to use walkdir instead of recursion803934dBy default only print last leaf of path📊 Changes
10 files changed (+301 additions, -305 deletions)
View changed files
📝
.gitignore(+1 -0)📝
Cargo.lock(+20 -0)📝
Cargo.toml(+1 -0)📝
README.md(+37 -27)📝
src/display.rs(+112 -58)➖
src/lib.rs(+0 -68)📝
src/main.rs(+12 -7)📝
src/tests.rs(+68 -43)📝
src/utils/mod.rs(+45 -88)📝
src/utils/platform.rs(+5 -14)📄 Description
Advised to use walkdir by burntsushi as using recursion on file systems
can blow the stack.
walkdir is slower but allows the code to be cleaner and more reliable
Also experimented with ignore but locking the hashmap resulted in
similar performance to walkdir but with much uglier code.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.