mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
Derive the most trivial ToAnimatedZero impls
This commit is contained in:
parent
8ca9542de6
commit
faaf31411a
15 changed files with 112 additions and 174 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue