Skip to content

Commit cf412a4

Browse files
committed
refactor(linter): make unwrap unconditional
1 parent 3ada6f8 commit cf412a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/oxc_linter/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ impl Linter {
233233
path: &Path,
234234
ctx_host: &ContextHost,
235235
) {
236-
// TODO: Error or `unwrap` instead of `return`?
237-
let Some(external_linter) = &self.external_linter else { return };
236+
// `external_linter` always exists when `oxlint2` feature is enabled
237+
let external_linter = self.external_linter.as_ref().unwrap();
238238

239239
let result = (external_linter.run)(
240240
path.to_str().unwrap().to_string(),

0 commit comments

Comments
 (0)