We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f51ee1c commit 3dadcf5Copy full SHA for 3dadcf5
src/visitor.rs
@@ -39,12 +39,9 @@ impl<'a, 'v> visit::Visitor<'v> for FmtVisitor<'a> {
39
self.codemap.lookup_char_pos(ex.span.hi));
40
self.format_missing(ex.span.lo);
41
42
- let offset = self.buffer.cur_offset();
43
- // FIXME: We put the entire offset into the block_indent, which might not be correct in all
44
- // situations.
45
let rewrite = ex.rewrite(&self.get_context(),
46
- self.config.max_width - offset,
47
- Indent::new(offset, 0));
+ self.config.max_width - self.block_indent.width(),
+ self.block_indent);
48
49
if let Some(new_str) = rewrite {
50
self.buffer.push_str(&new_str);
0 commit comments