From 3c72ab769b177e3f7835b6de62b1170e18546e3a Mon Sep 17 00:00:00 2001 From: Boshen Date: Sat, 29 Jun 2024 16:49:47 +0800 Subject: [PATCH] chore: s/with_labels([span])/with_label(span) --- crates/oxc_linter/src/fixer.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/oxc_linter/src/fixer.rs b/crates/oxc_linter/src/fixer.rs index 8f198e907222a..9ce5373eab0c7 100644 --- a/crates/oxc_linter/src/fixer.rs +++ b/crates/oxc_linter/src/fixer.rs @@ -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;";