mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Reduce max line length from 150 to 120 characters
Part of https://github.com/servo/servo/issues/6041
This commit is contained in:
parent
7561f7b83f
commit
8e3f4bba85
141 changed files with 1161 additions and 497 deletions
|
@ -9,12 +9,14 @@ use syntax::ast;
|
|||
use utils::match_ty_unwrap;
|
||||
|
||||
|
||||
pub fn expand_reflector(cx: &mut ExtCtxt, span: Span, _: &MetaItem, annotatable: Annotatable, push: &mut FnMut(Annotatable)) {
|
||||
pub fn expand_reflector(cx: &mut ExtCtxt, span: Span, _: &MetaItem, annotatable: Annotatable,
|
||||
push: &mut FnMut(Annotatable)) {
|
||||
if let Annotatable::Item(item) = annotatable {
|
||||
if let ast::ItemStruct(ref def, _) = item.node {
|
||||
let struct_name = item.ident;
|
||||
// This path has to be hardcoded, unfortunately, since we can't resolve paths at expansion time
|
||||
match def.fields.iter().find(|f| match_ty_unwrap(&*f.node.ty, &["dom", "bindings", "utils", "Reflector"]).is_some()) {
|
||||
match def.fields.iter().find(
|
||||
|f| match_ty_unwrap(&*f.node.ty, &["dom", "bindings", "utils", "Reflector"]).is_some()) {
|
||||
// If it has a field that is a Reflector, use that
|
||||
Some(f) => {
|
||||
let field_name = f.node.ident();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue