mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-07-15 01:22:56 +02:00
refactor(rust): cleanup path handling
- Avoids unnecessary string allocation when tracing paths - Replaces `mut path & path.push()` with `path.join()` - Avoids unncessary cloning of paths where applicable - Use `dunce` crate to remove `UNC` prefix - Improve performance of resolving `~` by avoiding unnecessary string allocations - Resolve `~`, `$Env:USERPROFILE` and `$HOME` consistenly between different code paths - Use `PathBuf` instead of `String` for paths in CLI args I may have missed a couple of places but I think I covered 90% of path handling in the codebase
This commit is contained in:
@@ -15,8 +15,6 @@ derive-ahk = { path = "../derive-ahk" }
|
||||
komorebi-core = { path = "../komorebi-core" }
|
||||
|
||||
clap = { version = "4", features = ["derive", "wrap_help"] }
|
||||
color-eyre = "0.6"
|
||||
dirs = "5"
|
||||
fs-tail = "0.1"
|
||||
heck = "0.4"
|
||||
lazy_static = "1"
|
||||
@@ -30,3 +28,6 @@ sysinfo = "0.29"
|
||||
uds_windows = "1"
|
||||
which = "5"
|
||||
windows = { workspace = true }
|
||||
color-eyre = { workspace = true }
|
||||
dirs = { workspace = true }
|
||||
dunce = { workspace = true }
|
||||
Reference in New Issue
Block a user