mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
style: Move fixed-point font types to Rust
Now that cbindgen and rust support const generics, it seems more simple. This centralizes all the relevant font constants etc in rust and avoids conversions when going from rust to C++ and vice versa. Differential Revision: https://phabricator.services.mozilla.com/D148847
This commit is contained in:
parent
48749641d3
commit
dcafbde256
10 changed files with 401 additions and 326 deletions
|
@ -143,7 +143,10 @@ pub fn fmap_trait_output(input: &DeriveInput, trait_path: &Path, trait_output: &
|
|||
let ident = &data.ident;
|
||||
GenericArgument::Type(parse_quote!(<#ident as #trait_path>::#trait_output))
|
||||
},
|
||||
ref arg => panic!("arguments {:?} cannot be mapped yet", arg),
|
||||
&GenericParam::Const(ref inner) => {
|
||||
let ident = &inner.ident;
|
||||
GenericArgument::Const(parse_quote!(#ident))
|
||||
},
|
||||
})
|
||||
.collect(),
|
||||
colon2_token: Default::default(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue