mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Implement #[distance(fallback)] for #[derive(ComputeSquaredDistance)]
This commit is contained in:
parent
4faadb489f
commit
41c3be54ea
3 changed files with 49 additions and 51 deletions
|
@ -25,7 +25,7 @@ pub fn derive_animate(stream: TokenStream) -> TokenStream {
|
|||
animate::derive(input).to_string().parse().unwrap()
|
||||
}
|
||||
|
||||
#[proc_macro_derive(ComputeSquaredDistance, attributes(animation))]
|
||||
#[proc_macro_derive(ComputeSquaredDistance, attributes(animation, distance))]
|
||||
pub fn derive_compute_squared_distance(stream: TokenStream) -> TokenStream {
|
||||
let input = syn::parse_derive_input(&stream.to_string()).unwrap();
|
||||
compute_squared_distance::derive(input).to_string().parse().unwrap()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue