Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions librubyfmt/src/intermediary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ impl<'src> Intermediary<'src> {
self.tokens.len()
}

pub fn fix_heredoc_duplicate_indent_mistake(&mut self) {
// Remove duplicate indent
self.tokens.remove(self.tokens.len() - 3);
}

pub fn last<const N: usize>(&self) -> Option<&[ConcreteLineToken<'src>; N]> {
self.tokens.last_chunk::<N>()
}
Expand Down
2 changes: 0 additions & 2 deletions librubyfmt/src/line_tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,6 @@ impl<'src> AbstractLineToken<'src> {
}
out.push(clats_heredoc_close(symbol));
out.push(cltats_hard_newline());
let indent_depth = if indent != 0 { indent - 2 } else { indent };
out.push(clats_indent(indent_depth));
}
}
}
Expand Down
16 changes: 0 additions & 16 deletions librubyfmt/src/render_queue_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,22 +198,6 @@ impl<'src> RenderQueueWriter<'src> {
}
}
}

if let Some(
[
ConcreteLineToken::HeredocClose { .. },
ConcreteLineToken::HardNewLine,
ConcreteLineToken::Indent { .. },
ConcreteLineToken::Indent { .. },
ConcreteLineToken::Delim { .. }
| ConcreteLineToken::Dot
| ConcreteLineToken::DirectPart { .. }
| ConcreteLineToken::MethodName { .. },
],
) = accum.last::<5>()
{
accum.fix_heredoc_duplicate_indent_mistake();
}
}
}

Expand Down
Loading