Skip to content

Commit

Permalink
librustdoc -- move closure to clarify scope
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Feb 11, 2014
1 parent c9c8049 commit 8dff89c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/fold.rs
Expand Up @@ -21,7 +21,6 @@ pub trait DocFolder {
fn fold_item_recur(&mut self, item: Item) -> Option<Item> {
let Item { attrs, name, source, visibility, id, inner } = item;
let inner = inner;
let c = |x| self.fold_item(x);
let inner = match inner {
StructItem(mut i) => {
let mut foo = ~[]; swap(&mut foo, &mut i.fields);
Expand Down Expand Up @@ -72,6 +71,7 @@ pub trait DocFolder {
StructVariant(mut j) => {
let mut foo = ~[]; swap(&mut foo, &mut j.fields);
let num_fields = foo.len();
let c = |x| self.fold_item(x);
j.fields.extend(&mut foo.move_iter().filter_map(c));
j.fields_stripped |= num_fields != j.fields.len();
VariantItem(Variant {kind: StructVariant(j), ..i2})
Expand Down

0 comments on commit 8dff89c

Please sign in to comment.