mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
[PR #64] [MERGED] Refactor ~ use Path/PathBuf instead of &str/String #284
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/64
Author: @rivy
Created: 2/4/2020
Status: ✅ Merged
Merged: 2/9/2020
Merged by: @bootandy
Base:
master← Head:rf.path📝 Commits (2)
9d4531dRefactor ~ use PathBuf instead of Stringa3d8fc0Refactor ~ useAsRef<Path>where possible📊 Changes
4 files changed (+104 additions, -100 deletions)
View changed files
📝
src/display.rs(+17 -11)📝
src/main.rs(+7 -3)📝
src/utils/mod.rs(+77 -84)📝
src/utils/platform.rs(+3 -2)📄 Description
This minimizes the string conversion/copy "fiddliness" and helps somewhat in code comprehension and maintaining/encouraging cross-platform compatibility.
There may be some additional work to be done with references, especially in the containers, that might be useful to further minimize copying. But it's a bit beyond my understanding of the language at the moment to go beyond this point.
Let me know if this is helpful, and if so, whether you'd like any changes.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.