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

This commit is contained in:
Paul Campbell 2024-06-03 20:34:01 +01:00
parent 621e599b31
commit e29c274aaf
2 changed files with 4 additions and 3 deletions

View file

@ -41,6 +41,7 @@ warp = { workspace = true }
# boilerplate
derive_more = { workspace = true }
thiserror = { workspace = true }
# file watcher
inotify = { workspace = true }

View file

@ -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,