config store & event loop with reconn
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
use std::error::Error;
|
||||
|
||||
pub trait LogError {
|
||||
fn log_error<S : AsRef<str>>(self, msg: S);
|
||||
}
|
||||
|
||||
impl<V, E : Error> LogError for Result<V, E> {
|
||||
fn log_error<S : AsRef<str>>(self, msg: S) {
|
||||
match self {
|
||||
Ok(_) => {}
|
||||
Err(e) => {
|
||||
error!("{}: {}", msg.as_ref(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user