Skip to content

Commit cadd3d9

Browse files
authored
[perf] Skip more no-op calls in on_line (#825)
1 parent 2fd2b91 commit cadd3d9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

librubyfmt/src/file_comments.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,7 @@ impl FileComments {
213213
) -> Option<(CommentBlock, LineNumber)> {
214214
let lowest_line = self.other_comments.first().map(|(ln, _)| *ln)?;
215215
if lowest_line > line_number {
216-
return Some((
217-
CommentBlock::new(lowest_line..line_number + 1, Vec::new()),
218-
starting_line_number,
219-
));
216+
return None;
220217
}
221218

222219
let split_point = self

0 commit comments

Comments
 (0)