Skip to content

Commit

Permalink
Merge pull request #162 from cassiersg/sep-mods
Browse files Browse the repository at this point in the history
Move modules listing outside of FmtVisitor
  • Loading branch information
cassiersg committed Aug 2, 2015
2 parents bc43b81 + 5a29d2f commit d07eb28
Show file tree
Hide file tree
Showing 13 changed files with 273 additions and 386 deletions.
22 changes: 11 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

256 changes: 0 additions & 256 deletions src/changes.rs

This file was deleted.

8 changes: 2 additions & 6 deletions src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,9 @@ impl Rewrite for ast::Block {

// Push text between last block item and end of block
let snippet = visitor.snippet(mk_sp(visitor.last_pos, self.span.hi));
visitor.changes.push_str_span(self.span, &snippet);
visitor.buffer.push_str(&snippet);

// Stringify visitor
let file_name = context.codemap.span_to_filename(self.span);
let string_buffer = visitor.changes.get(&file_name);

Some(format!("{}{}", prefix, string_buffer))
Some(format!("{}{}", prefix, visitor.buffer))
}
}

Expand Down
Loading

0 comments on commit d07eb28

Please sign in to comment.