33
44#![ no_main]
55
6- use std:: sync:: { Mutex , OnceLock } ;
6+ use std:: sync:: { Arc , Mutex , OnceLock } ;
77
88use 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
3636impl 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