From 272f1a88b9a174115e0943b6c215ae3db6872ffa Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sun, 30 Dec 2018 20:12:17 -0800 Subject: [PATCH] Fix warning --- tokio-postgres/src/config.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tokio-postgres/src/config.rs b/tokio-postgres/src/config.rs index 28860103..ad03ba7b 100644 --- a/tokio-postgres/src/config.rs +++ b/tokio-postgres/src/config.rs @@ -294,14 +294,17 @@ impl fmt::Display for UnknownOption { impl error::Error for UnknownOption {} #[derive(Debug)] +#[cfg(feature = "runtime")] struct InvalidValue(&'static str); +#[cfg(feature = "runtime")] impl fmt::Display for InvalidValue { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { write!(fmt, "invalid value for option `{}`", self.0) } } +#[cfg(feature = "runtime")] impl error::Error for InvalidValue {} struct Parser<'a> {