File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 11use directories:: ProjectDirs ;
22use hashfilter:: HashFilter ;
33use lazy_static:: lazy_static;
4- use std:: sync:: { Arc , RwLock } ;
4+ use std:: sync:: RwLock ;
55
66use crate :: config:: ConfigFile ;
77
88lazy_static ! {
9- static ref PATHDB : Arc < RwLock <HashFilter >> = Arc :: new ( RwLock :: new( HashFilter :: default ( ) ) ) ;
10- static ref CONFIG : Arc < RwLock <ConfigFile >> = Arc :: new ( RwLock :: new( ConfigFile :: default ( ) ) ) ;
9+ static ref PATHDB : RwLock <HashFilter > = RwLock :: new( HashFilter :: default ( ) ) ;
10+ static ref CONFIG : RwLock <ConfigFile > = RwLock :: new( ConfigFile :: default ( ) ) ;
1111}
1212
1313pub fn init ( ) {
@@ -20,10 +20,10 @@ pub fn init() {
2020 }
2121}
2222
23- pub fn config ( ) -> Arc < RwLock < ConfigFile > > {
24- CONFIG . clone ( )
23+ pub fn config ( ) -> & ' static RwLock < ConfigFile > {
24+ & CONFIG
2525}
2626
27- pub fn pathdb ( ) -> Arc < RwLock < HashFilter > > {
28- PATHDB . clone ( )
27+ pub fn pathdb ( ) -> & ' static RwLock < HashFilter > {
28+ & PATHDB
2929}
You can’t perform that action at this time.
0 commit comments