diff --git a/crates/server/Cargo.toml b/crates/server/Cargo.toml index 0b57586..3d21f08 100644 --- a/crates/server/Cargo.toml +++ b/crates/server/Cargo.toml @@ -41,6 +41,7 @@ warp = { workspace = true } # boilerplate derive_more = { workspace = true } +thiserror = { workspace = true } # file watcher inotify = { workspace = true } diff --git a/crates/server/src/actors/file_watcher.rs b/crates/server/src/actors/file_watcher.rs index 52875b9..7663147 100644 --- a/crates/server/src/actors/file_watcher.rs +++ b/crates/server/src/actors/file_watcher.rs @@ -15,11 +15,11 @@ pub struct WatchFile; #[rtype(result = "()")] pub struct FileUpdated; -#[derive(Debug, derive_more::From, derive_more::Display)] +#[derive(Debug, thiserror::Error)] pub enum Error { - Io(std::io::Error), + #[error("io")] + Io(#[from] std::io::Error), } -impl std::error::Error for Error {} pub struct FileWatcher { path: PathBuf,