diff --git a/src/lib.rs b/src/lib.rs index 594b69d..cf7107b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -51,7 +51,9 @@ pub trait DeserializerAcceptor<'a> { /// The return type for the accept method type Output; /// Accept a serde::Deserializer and do whatever you want with it. - fn accept>(self, T) -> Self::Output; + fn accept(self, T) -> Self::Output + where + T: serde::Deserializer<'a, Error = Error>; } /// An object that implements this trait can be passed a @@ -63,7 +65,9 @@ pub trait SerializerAcceptor { /// The return type for the accept method type Output; /// Accept a serde::Serializer and do whatever you want with it. - fn accept(self, T) -> Self::Output; + fn accept(self, T) -> Self::Output + where + T: serde::Serializer; } /// Get a default configuration object.