66#[ cfg( all( test, nightly) ) ]
77extern crate test;
88
9- #[ cfg( all( test, nightly) ) ]
10- #[ global_allocator]
11- static ALLOC : jemallocator:: Jemalloc = jemallocator:: Jemalloc ;
12-
139mod api;
10+ mod blocklist;
1411mod logger;
1512mod parser;
13+ mod trie;
1614
15+ use self :: { blocklist:: BlockList , logger:: init_logger} ;
1716use anyhow:: { anyhow, bail, Context } ;
1817use async_trait:: async_trait;
18+ use clap:: { Parser , Subcommand } ;
1919use directories:: ProjectDirs ;
2020use hickory_proto:: {
2121 op:: { header:: Header , response_code:: ResponseCode } ,
@@ -28,7 +28,9 @@ use hickory_server::{
2828 ServerFuture as Server
2929} ;
3030use log:: { debug, error, info, warn} ;
31+ use notify:: RecursiveMode ;
3132use once_cell:: sync:: Lazy ;
33+ use parking_lot:: RwLock ;
3234use reqwest:: Client ;
3335use rustls:: {
3436 crypto:: CryptoProvider ,
@@ -60,7 +62,9 @@ use tokio::{
6062} ;
6163use url:: Url ;
6264
63- use clap:: { Parser , Subcommand } ;
65+ #[ cfg( all( test, nightly) ) ]
66+ #[ global_allocator]
67+ static ALLOC : jemallocator:: Jemalloc = jemallocator:: Jemalloc ;
6468
6569const CARGO_PKG_NAME : & str = env ! ( "CARGO_PKG_NAME" ) ;
6670const CARGO_PKG_VERSION : & str = env ! ( "CARGO_PKG_VERSION" ) ;
@@ -109,15 +113,6 @@ static CONFIG_PATH: Lazy<PathBuf> = Lazy::new(|| {
109113
110114static CLIENT : Lazy < Client > = Lazy :: new ( Client :: new) ;
111115
112- mod trie;
113-
114- mod blocklist;
115- use blocklist:: BlockList ;
116-
117- use crate :: logger:: init_logger;
118- use notify:: RecursiveMode ;
119- use parking_lot:: RwLock ;
120-
121116#[ derive( Debug , Clone ) ]
122117struct Stats {
123118 total_request : Arc < AtomicU64 > ,
0 commit comments