INNER CODE UNIT · Rust
in
stjude-rust-labs/sprocket · crates/gauntlet/src/lib.rs:313
for i in (0..start_index).rev() {
if diagnostics[i].document() != &document_identifier {
break;
}
start_index -= 1;
}
diagnostics[start_index..]
.iter()
.map_while(|d| {
if d.document() == &document_identifier {
// Normalize the diagnostic message from config
// to handle
// platform-specific differences
Some(normalize_diagnostic(d.message()))
} else {
None