summaryrefslogtreecommitdiffstats
path: root/src/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs
index eff3c7c..56c827a 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -3,6 +3,7 @@ use std::borrow::Cow;
use std::result;
use std::fmt;
use serde::de;
+use serde::ser;
use nom;
#[derive(Debug)]
@@ -201,3 +202,9 @@ impl de::Error for ConfigError {
ConfigError::Message(msg.to_string())
}
}
+
+impl ser::Error for ConfigError {
+ fn custom<T: fmt::Display>(msg: T) -> Self {
+ ConfigError::Message(msg.to_string())
+ }
+}