Skip to content

Commit af800c6

Browse files
committed
Fix fuzz
1 parent 9a3f1b0 commit af800c6

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

crates/red_knot_project/src/metadata/settings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use red_knot_python_semantic::lint::RuleSelection;
1414
/// changing the terminal settings shouldn't invalidate any core type-checking queries.
1515
/// This can be achieved by adding a salsa query for the type checking specific settings.
1616
///
17-
/// Settings that are part of [`ProgramSettings`] are not included here.
17+
/// Settings that are part of [`red_knot_python_semantic::ProgramSettings`] are not included here.
1818
#[derive(Clone, Debug, Eq, PartialEq)]
1919
pub struct Settings {
2020
rules: Arc<RuleSelection>,

fuzz/fuzz_targets/red_knot_check_invalid_syntax.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
#![no_main]
55

6-
use std::sync::{Mutex, OnceLock};
6+
use std::sync::{Arc, Mutex, OnceLock};
77

88
use libfuzzer_sys::{fuzz_target, Corpus};
99

@@ -29,8 +29,8 @@ struct TestDb {
2929
files: Files,
3030
system: TestSystem,
3131
vendored: VendoredFileSystem,
32-
events: std::sync::Arc<Mutex<Vec<salsa::Event>>>,
33-
rule_selection: std::sync::Arc<RuleSelection>,
32+
events: Arc<Mutex<Vec<salsa::Event>>>,
33+
rule_selection: Arc<RuleSelection>,
3434
}
3535

3636
impl TestDb {
@@ -39,7 +39,7 @@ impl TestDb {
3939
storage: salsa::Storage::default(),
4040
system: TestSystem::default(),
4141
vendored: red_knot_vendored::file_system().clone(),
42-
events: std::sync::Arc::default(),
42+
events: Arc::default(),
4343
files: Files::default(),
4444
rule_selection: RuleSelection::from_registry(default_lint_registry()).into(),
4545
}
@@ -86,8 +86,8 @@ impl SemanticDb for TestDb {
8686
!file.path(self).is_vendored_path()
8787
}
8888

89-
fn rule_selection(&self) -> &RuleSelection {
90-
&self.rule_selection
89+
fn rule_selection(&self) -> Arc<RuleSelection> {
90+
self.rule_selection.clone()
9191
}
9292

9393
fn lint_registry(&self) -> &LintRegistry {

0 commit comments

Comments
 (0)