forked from kemitix/git-next
refactor: server: use thiserror
This commit is contained in:
parent
621e599b31
commit
e29c274aaf
2 changed files with 4 additions and 3 deletions
|
@ -41,6 +41,7 @@ warp = { workspace = true }
|
||||||
|
|
||||||
# boilerplate
|
# boilerplate
|
||||||
derive_more = { workspace = true }
|
derive_more = { workspace = true }
|
||||||
|
thiserror = { workspace = true }
|
||||||
|
|
||||||
# file watcher
|
# file watcher
|
||||||
inotify = { workspace = true }
|
inotify = { workspace = true }
|
||||||
|
|
|
@ -15,11 +15,11 @@ pub struct WatchFile;
|
||||||
#[rtype(result = "()")]
|
#[rtype(result = "()")]
|
||||||
pub struct FileUpdated;
|
pub struct FileUpdated;
|
||||||
|
|
||||||
#[derive(Debug, derive_more::From, derive_more::Display)]
|
#[derive(Debug, thiserror::Error)]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
Io(std::io::Error),
|
#[error("io")]
|
||||||
|
Io(#[from] std::io::Error),
|
||||||
}
|
}
|
||||||
impl std::error::Error for Error {}
|
|
||||||
|
|
||||||
pub struct FileWatcher {
|
pub struct FileWatcher {
|
||||||
path: PathBuf,
|
path: PathBuf,
|
||||||
|
|
Loading…
Reference in a new issue