Skip to content

Commit

Permalink
chore: s/with_labels([span])/with_label(span)
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Jun 29, 2024
1 parent c26975a commit 3c72ab7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/oxc_linter/src/fixer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;";
Expand Down

0 comments on commit 3c72ab7

Please sign in to comment.