Format component of style_derive

This commit is contained in:
chansuke 2018-09-07 22:18:51 +09:00
parent 51283cf77a
commit 25bc998f17
8 changed files with 156 additions and 127 deletions

View file

@ -16,12 +16,16 @@ pub fn derive(mut input: DeriveInput) -> quote::Tokens {
);
}
let to_body = cg::fmap_match(&input, BindStyle::Move, |binding| {
quote!(::values::animated::ToAnimatedValue::to_animated_value(#binding))
});
let from_body = cg::fmap_match(&input, BindStyle::Move, |binding| {
quote!(::values::animated::ToAnimatedValue::from_animated_value(#binding))
});
let to_body = cg::fmap_match(
&input,
BindStyle::Move,
|binding| quote!(::values::animated::ToAnimatedValue::to_animated_value(#binding)),
);
let from_body = cg::fmap_match(
&input,
BindStyle::Move,
|binding| quote!(::values::animated::ToAnimatedValue::from_animated_value(#binding)),
);
input.generics.where_clause = where_clause;
let name = &input.ident;