Derive the most trivial ToAnimatedZero impls

This commit is contained in:
Anthony Ramine 2017-08-22 15:30:43 +02:00
parent 8ca9542de6
commit faaf31411a
15 changed files with 112 additions and 174 deletions

View file

@ -12,6 +12,7 @@ use proc_macro::TokenStream;
mod compute_squared_distance;
mod has_viewport_percentage;
mod to_animated_value;
mod to_animated_zero;
mod to_computed_value;
mod to_css;
@ -33,6 +34,12 @@ pub fn derive_to_animated_value(stream: TokenStream) -> TokenStream {
to_animated_value::derive(input).to_string().parse().unwrap()
}
#[proc_macro_derive(ToAnimatedZero)]
pub fn derive_to_animated_zero(stream: TokenStream) -> TokenStream {
let input = syn::parse_derive_input(&stream.to_string()).unwrap();
to_animated_zero::derive(input).to_string().parse().unwrap()
}
#[proc_macro_derive(ToComputedValue)]
pub fn derive_to_computed_value(stream: TokenStream) -> TokenStream {
let input = syn::parse_derive_input(&stream.to_string()).unwrap();