Skip to content
Merged
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
7 changes: 3 additions & 4 deletions crates/oxc_linter/src/tsgolint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -662,17 +662,16 @@ impl Iterator for TsGoLintMessageStream {
let mut cursor = std::io::Cursor::new(self.buffer.as_slice());

if cursor.position() < self.buffer.len() as u64 {
let start_pos = cursor.position();
match parse_single_message(&mut cursor) {
Ok(message) => {
// Successfully parsed a message, remove it from buffer
#[expect(clippy::cast_possible_truncation)]
self.buffer.drain(..cursor.position() as usize);
return Some(Ok(message));
}
Err(_) => {
// Could not parse a complete message, need more data
cursor.set_position(start_pos);
Err(TsGoLintMessageParseError::IncompleteData) => {}
Err(e) => {
return Some(Err(e.to_string()));
}
}
}
Expand Down
Loading