Skip to content
This repository was archived by the owner on Nov 24, 2023. It is now read-only.

Commit da7d992

Browse files
committed
Add Comment to Remember Parsing Errors are Eaten
1 parent a249a96 commit da7d992

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ fn try_main() -> Result<(), ProgramError> {
7474

7575
let suggestions: Vec<Suggestion> = json.lines()
7676
.filter(not_empty)
77+
// Convert JSON string (and eat parsing errors)
7778
.flat_map(|line| serde_json::from_str::<Diagnostic>(line))
79+
// One diagnostic line might have multiple suggestions
7880
.flat_map(|diagnostic| rustfix::collect_suggestions(&diagnostic, None))
7981
.collect();
8082

0 commit comments

Comments
 (0)