Don't force serde_json::Error

This commit is contained in:
asonix 2020-05-21 13:31:00 -05:00
parent 862426e504
commit 4e89c6eaaa

View file

@ -227,12 +227,13 @@ impl<Inner, A, B, C> Ext3<Inner, A, B, C> {
}
}
impl<Inner, A, Kind> Extends<Kind> for Ext1<Inner, A>
impl<Inner, A, Kind, Error> Extends<Kind> for Ext1<Inner, A>
where
Inner: Extends<Kind, Error = serde_json::Error> + UnparsedMut,
A: UnparsedExtension<Inner, Error = serde_json::Error>,
Inner: Extends<Kind, Error = Error> + UnparsedMut,
A: UnparsedExtension<Inner, Error = Error>,
Error: From<serde_json::Error> + std::error::Error,
{
type Error = serde_json::Error;
type Error = Error;
fn extends(base: Base<Kind>) -> Result<Self, Self::Error> {
let mut inner = Inner::extends(base)?;
@ -249,13 +250,14 @@ where
}
}
impl<Inner, A, B, Kind> Extends<Kind> for Ext2<Inner, A, B>
impl<Inner, A, B, Kind, Error> Extends<Kind> for Ext2<Inner, A, B>
where
Inner: Extends<Kind, Error = serde_json::Error> + UnparsedMut,
A: UnparsedExtension<Inner, Error = serde_json::Error>,
B: UnparsedExtension<Inner, Error = serde_json::Error>,
Inner: Extends<Kind, Error = Error> + UnparsedMut,
A: UnparsedExtension<Inner, Error = Error>,
B: UnparsedExtension<Inner, Error = Error>,
Error: From<serde_json::Error> + std::error::Error,
{
type Error = serde_json::Error;
type Error = Error;
fn extends(base: Base<Kind>) -> Result<Self, Self::Error> {
let mut inner = Inner::extends(base)?;
@ -282,14 +284,15 @@ where
}
}
impl<Inner, A, B, C, Kind> Extends<Kind> for Ext3<Inner, A, B, C>
impl<Inner, A, B, C, Kind, Error> Extends<Kind> for Ext3<Inner, A, B, C>
where
Inner: Extends<Kind, Error = serde_json::Error> + UnparsedMut,
A: UnparsedExtension<Inner, Error = serde_json::Error>,
B: UnparsedExtension<Inner, Error = serde_json::Error>,
C: UnparsedExtension<Inner, Error = serde_json::Error>,
Inner: Extends<Kind, Error = Error> + UnparsedMut,
A: UnparsedExtension<Inner, Error = Error>,
B: UnparsedExtension<Inner, Error = Error>,
C: UnparsedExtension<Inner, Error = Error>,
Error: From<serde_json::Error> + std::error::Error,
{
type Error = serde_json::Error;
type Error = Error;
fn extends(base: Base<Kind>) -> Result<Self, Self::Error> {
let mut inner = Inner::extends(base)?;
@ -320,15 +323,16 @@ where
}
}
impl<Inner, A, B, C, D, Kind> Extends<Kind> for Ext4<Inner, A, B, C, D>
impl<Inner, A, B, C, D, Kind, Error> Extends<Kind> for Ext4<Inner, A, B, C, D>
where
Inner: Extends<Kind, Error = serde_json::Error> + UnparsedMut,
A: UnparsedExtension<Inner, Error = serde_json::Error>,
B: UnparsedExtension<Inner, Error = serde_json::Error>,
C: UnparsedExtension<Inner, Error = serde_json::Error>,
D: UnparsedExtension<Inner, Error = serde_json::Error>,
Inner: Extends<Kind, Error = Error> + UnparsedMut,
A: UnparsedExtension<Inner, Error = Error>,
B: UnparsedExtension<Inner, Error = Error>,
C: UnparsedExtension<Inner, Error = Error>,
D: UnparsedExtension<Inner, Error = Error>,
Error: From<serde_json::Error> + std::error::Error,
{
type Error = serde_json::Error;
type Error = Error;
fn extends(base: Base<Kind>) -> Result<Self, Self::Error> {
let mut inner = Inner::extends(base)?;