remove unnesscary bounds.
@@ -271,8 +271,6 @@ pub fn impl_from_into(input: &InputModel) -> TokenStream {
#S: std::clone::Clone
+ std::default::Default
+ identity_diff::Diff
- + std::fmt::Debug
- + std::cmp::PartialEq
+ for<'de> serde::Deserialize<'de>
+ serde::Serialize
#(+ #bounds)*
@@ -285,16 +283,14 @@ pub fn impl_from_into(input: &InputModel) -> TokenStream {
let clause = quote! { where #(#preds),*};
quote! {
- impl <#(#param_decls),*> std::convert::From<#name<#params>> for #diff<#params>
- #clause
+ impl <#(#param_decls),*> std::convert::From<#name<#params>> for #diff<#params> #clause
{
fn from(name: #name<#params>) -> Self {
name.into_diff()
}
}
- impl <#(#param_decls),*> std::convert::From<#diff<#params>> for #name<#params>
- #clause
+ impl <#(#param_decls),*> std::convert::From<#diff<#params>> for #name<#params> #clause
{
fn from(diff: #diff<#params>) -> Self {
Self::from_diff(diff)
