mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
style: Share more code between ToAnimatedValue and ToComputedValue derive.
I'm going to add a ToResolvedValue, and I don't want to add more copy-pasta. This shouldn't change behavior. Differential Revision: https://phabricator.services.mozilla.com/D26289
This commit is contained in:
parent
ae32e4df40
commit
c3ab3f0963
3 changed files with 124 additions and 103 deletions
|
@ -32,8 +32,8 @@ use synstructure::{self, BindStyle, BindingInfo, VariantAst, VariantInfo};
|
|||
pub fn propagate_clauses_to_output_type(
|
||||
where_clause: &mut Option<syn::WhereClause>,
|
||||
generics: &syn::Generics,
|
||||
trait_path: Path,
|
||||
trait_output: Ident,
|
||||
trait_path: &Path,
|
||||
trait_output: &Ident,
|
||||
) {
|
||||
let where_clause = match *where_clause {
|
||||
Some(ref mut clause) => clause,
|
||||
|
@ -104,7 +104,7 @@ where
|
|||
})
|
||||
}
|
||||
|
||||
pub fn fmap_trait_output(input: &DeriveInput, trait_path: &Path, trait_output: Ident) -> Path {
|
||||
pub fn fmap_trait_output(input: &DeriveInput, trait_path: &Path, trait_output: &Ident) -> Path {
|
||||
let segment = PathSegment {
|
||||
ident: input.ident.clone(),
|
||||
arguments: PathArguments::AngleBracketed(AngleBracketedGenericArguments {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue