refactor: add methods and implement traits for FilePath and SafeFilePath (#1727)

* refactor: add methods and implement traits for `FilePath` and `SafeFilePath`

closes #1726

* clippy

* path -> as_path

* fix prettierignore

* Discard changes to Cargo.lock

* Discard changes to Cargo.toml

* update tauri deps
This commit is contained in:
Amr Bashir
2024-09-05 14:12:40 +03:00
committed by GitHub
parent d00519e3e3
commit a2fe55512f
17 changed files with 370 additions and 233 deletions
+10
View File
@@ -0,0 +1,10 @@
---
"fs": patch
"dialog": patch
---
Add utility methods on `FilePath` and `SafeFilePath` enums which are:
- `path`
- `simplified`
- `into_path`
+6
View File
@@ -0,0 +1,6 @@
---
"fs": patch
"dialog": patch
---
Implement `Serialize`, `Deserialize`, `From`, `TryFrom` and `FromStr` traits for `FilePath` and `SafeFilePath` enums.
@@ -0,0 +1,6 @@
---
"fs": patch
"dialog": patch
---
Mark `Error` enum as `#[non_exhuastive]`.
+6
View File
@@ -0,0 +1,6 @@
---
"fs": patch
"dialog": patch
---
Add `SafeFilePath` enum.