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
+1 -2
View File
@@ -7,6 +7,7 @@ use serde::{ser::Serializer, Serialize};
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum Error {
#[error(transparent)]
Tauri(#[from] tauri::Error),
@@ -20,8 +21,6 @@ pub enum Error {
FolderPickerNotImplemented,
#[error(transparent)]
Fs(#[from] tauri_plugin_fs::Error),
#[error("URL is not a valid path")]
InvalidPathUrl,
}
impl Serialize for Error {