1
Fork 0

syntax: fix the indentation of a function

This commit is contained in:
Erick Tryzelaar 2013-02-11 08:02:51 -08:00
parent e6d84268fa
commit 59ba4fc104

View file

@ -213,7 +213,7 @@ fn noop_fold_struct_field(&&sf: @struct_field, fld: ast_fold)
} }
pub fn noop_fold_item_underscore(i: item_, fld: ast_fold) -> item_ { pub fn noop_fold_item_underscore(i: item_, fld: ast_fold) -> item_ {
return match i { match i {
item_const(t, e) => item_const(fld.fold_ty(t), fld.fold_expr(e)), item_const(t, e) => item_const(fld.fold_ty(t), fld.fold_expr(e)),
item_fn(decl, purity, typms, ref body) => { item_fn(decl, purity, typms, ref body) => {
item_fn(fold_fn_decl(decl, fld), item_fn(fold_fn_decl(decl, fld),
@ -241,24 +241,24 @@ pub fn noop_fold_item_underscore(i: item_, fld: ast_fold) -> item_ {
item_impl(fold_ty_params(tps, fld), item_impl(fold_ty_params(tps, fld),
ifce.map(|p| fold_trait_ref(*p, fld)), ifce.map(|p| fold_trait_ref(*p, fld)),
fld.fold_ty(ty), fld.fold_ty(ty),
vec::map(*methods, |x| fld.fold_method(*x))) methods.map(|x| fld.fold_method(*x)))
} }
item_trait(tps, traits, ref methods) => { item_trait(tps, traits, ref methods) => {
let methods = do (*methods).map |method| { let methods = do methods.map |method| {
match *method { match *method {
required(*) => copy *method, required(*) => copy *method,
provided(method) => provided(fld.fold_method(method)) provided(method) => provided(fld.fold_method(method))
} }
}; };
item_trait(fold_ty_params(tps, fld), item_trait(fold_ty_params(tps, fld),
vec::map(traits, |p| fold_trait_ref(*p, fld)), traits.map(|p| fold_trait_ref(*p, fld)),
methods) methods)
} }
item_mac(ref m) => { item_mac(ref m) => {
// FIXME #2888: we might actually want to do something here. // FIXME #2888: we might actually want to do something here.
item_mac((*m)) item_mac((*m))
} }
}; }
} }
fn fold_struct_def(struct_def: @ast::struct_def, fld: ast_fold) fn fold_struct_def(struct_def: @ast::struct_def, fld: ast_fold)