chore: s/with_labels([span])/with_label(span)

This commit is contained in:
Boshen 2024-06-29 16:49:47 +08:00
parent c26975ab76
commit 3c72ab769b
No known key found for this signature in database
GPG key ID: 9C7A8C8AB22BEBD1

View file

@ -291,7 +291,7 @@ mod test {
}
fn remove_middle(span: Span) -> OxcDiagnostic {
OxcDiagnostic::warn("removemiddle").with_labels([span])
OxcDiagnostic::warn("removemiddle").with_label(span)
}
fn remove_end() -> OxcDiagnostic {
@ -303,15 +303,15 @@ mod test {
}
fn no_fix(span: Span) -> OxcDiagnostic {
OxcDiagnostic::warn("nofix").with_labels([span])
OxcDiagnostic::warn("nofix").with_label(span)
}
fn no_fix_1(span: Span) -> OxcDiagnostic {
OxcDiagnostic::warn("nofix1").with_labels([span])
OxcDiagnostic::warn("nofix1").with_label(span)
}
fn no_fix_2(span: Span) -> OxcDiagnostic {
OxcDiagnostic::warn("nofix2").with_labels([span])
OxcDiagnostic::warn("nofix2").with_label(span)
}
const TEST_CODE: &str = "var answer = 6 * 7;";