refactor: server: use thiserror
All checks were successful
Rust / build (push) Successful in 2m15s
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/cron/cron-docker-builder Pipeline was successful
ci/woodpecker/cron/push-next Pipeline was successful
ci/woodpecker/cron/tag-created Pipeline was successful
All checks were successful
Rust / build (push) Successful in 2m15s
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/cron/cron-docker-builder Pipeline was successful
ci/woodpecker/cron/push-next Pipeline was successful
ci/woodpecker/cron/tag-created Pipeline was successful
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