1
Fork 0

Remove ChangeSet of FmtVisitor

This commit is contained in:
Gaëtan Cassiers 2015-07-26 14:05:43 +02:00
parent 0e10329dc7
commit 0eab4bf430
7 changed files with 67 additions and 158 deletions

View file

@ -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))
}
}