File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -662,17 +662,16 @@ impl Iterator for TsGoLintMessageStream {
662662 let mut cursor = std:: io:: Cursor :: new ( self . buffer . as_slice ( ) ) ;
663663
664664 if cursor. position ( ) < self . buffer . len ( ) as u64 {
665- let start_pos = cursor. position ( ) ;
666665 match parse_single_message ( & mut cursor) {
667666 Ok ( message) => {
668667 // Successfully parsed a message, remove it from buffer
669668 #[ expect( clippy:: cast_possible_truncation) ]
670669 self . buffer . drain ( ..cursor. position ( ) as usize ) ;
671670 return Some ( Ok ( message) ) ;
672671 }
673- Err ( _ ) => {
674- // Could not parse a complete message, need more data
675- cursor . set_position ( start_pos ) ;
672+ Err ( TsGoLintMessageParseError :: IncompleteData ) => { }
673+ Err ( e ) => {
674+ return Some ( Err ( e . to_string ( ) ) ) ;
676675 }
677676 }
678677 }
You can’t perform that action at this time.
0 commit comments