-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor conversions to separate files related to conversions themsel…
…ves (#40) * Remove implementation of AsRef for utf8 native path and pathbuf Removes the implementation of `AsRef<std::path::Path>` for both `Utf8NativePath` and `Utf8NativePathBuf` to avoid situations where code using native path aliases appears to compile on one platform and fails on another. Also removes associated `TryAsRef` and other implementations that leveraged these at compile-time. ```rust // Compiles on Unix-like platforms, does not compile on Windows fn foo(path: &UnixPath) -> _ { std::fs::exists(path) } ``` It is instead recommended to use the new `PlatformPath` to ensure types are respected and work across operating system targets. * Refactor convert file into the files related to the conversions Moves all of the convert.rs contents to specific files versus bundling conversion logic into a singular file that becomes a spaghetti of imports and logic. 1. Conversions to/from `WindowsComponent` have been moved to the associated file. 2. Conversions to/from `UnixComponent` have been moved to the associated file. * Fix linting errors
- Loading branch information
1 parent
e1d1443
commit 73e9da6
Showing
27 changed files
with
651 additions
and
718 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.