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> {