This commit is contained in:
Robin Appelman 2019-05-16 12:32:59 +02:00
commit 9cbfb0ff3e
2 changed files with 8 additions and 6 deletions

2
Cargo.lock generated
View file

@ -1,3 +1,5 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
[[package]]
name = "ascii"
version = "0.9.1"

View file

@ -1,12 +1,12 @@
use notify::{DebouncedEvent, RecommendedWatcher, RecursiveMode, Watcher};
use redis::{Client, Commands, Connection, RedisResult};
use std::env;
use std::error::Error;
use std::fmt;
use std::fmt::Display;
use std::result::Result;
use std::sync::mpsc::channel;
use std::time::Duration;
use std::fmt::Display;
use std::fmt;
use std::error::Error;
#[derive(Debug)]
enum WatchError {
@ -30,16 +30,16 @@ impl Display for WatchError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
WatchError::Redis(err) => err.fmt(f),
WatchError::Notify(err) => err.fmt(f)
WatchError::Notify(err) => err.fmt(f),
}
}
}
impl Error for WatchError {
fn cause(&self) -> Option<&Error> {
fn cause(&self) -> Option<&dyn Error> {
match self {
WatchError::Redis(err) => Some(err),
WatchError::Notify(err) => Some(err)
WatchError::Notify(err) => Some(err),
}
}
}