diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/error.rs | 8 | ||||
-rw-r--r-- | src/main.rs | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/error.rs b/src/error.rs index 600db68..2440169 100644 --- a/src/error.rs +++ b/src/error.rs @@ -6,13 +6,13 @@ use thiserror::Error; pub enum Error { #[error("link {0} not found")] LinkNotFound(String), - #[error("io")] + #[error("io: {0}")] Io(#[from] io::Error), - #[error("notify")] + #[error("notify: {0}")] Notify(#[from] notify::Error), - #[error("rtnetlink")] + #[error("rtnetlink: {0}")] RtNetlink(#[from] rtnetlink::Error), - #[error("serde_json")] + #[error("serde_json: {0}")] SerdeJson(#[from] serde_json::Error), } diff --git a/src/main.rs b/src/main.rs index 6abdccc..a06e9f6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -24,7 +24,7 @@ fn main() -> Result<()> { let mut watcher = notify::recommended_watcher(|res: notify::Result<Event>| match res { Ok(_) => configure_wan(), - Err(e) => println!("[netlinkd] watch error: {}", e), + Err(e) => println!("[netlinkd] watch error: {:?}", e), })?; watcher.watch(ip_config, RecursiveMode::NonRecursive)?; @@ -37,7 +37,7 @@ fn main() -> Result<()> { fn configure_wan() { match configure_rsppp0() { Ok(_) => println!("[netlinkd] configure rsppp0 with PPPoE data"), - Err(e) => println!("[netlinkd] can't configure rsppp0: {}", e), + Err(e) => println!("[netlinkd] can't configure rsppp0: {:?}", e), } } |