Skip to content

Commit b2adc06

Browse files
committed
Move imports to the top
1 parent 81bbc6c commit b2adc06

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

src/main.rs

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
#[cfg(all(test, nightly))]
77
extern crate test;
88

9-
#[cfg(all(test, nightly))]
10-
#[global_allocator]
11-
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
12-
139
mod api;
10+
mod blocklist;
1411
mod logger;
1512
mod parser;
13+
mod trie;
1614

15+
use self::{blocklist::BlockList, logger::init_logger};
1716
use anyhow::{anyhow, bail, Context};
1817
use async_trait::async_trait;
18+
use clap::{Parser, Subcommand};
1919
use directories::ProjectDirs;
2020
use hickory_proto::{
2121
op::{header::Header, response_code::ResponseCode},
@@ -28,7 +28,9 @@ use hickory_server::{
2828
ServerFuture as Server
2929
};
3030
use log::{debug, error, info, warn};
31+
use notify::RecursiveMode;
3132
use once_cell::sync::Lazy;
33+
use parking_lot::RwLock;
3234
use reqwest::Client;
3335
use rustls::{
3436
crypto::CryptoProvider,
@@ -60,7 +62,9 @@ use tokio::{
6062
};
6163
use url::Url;
6264

63-
use clap::{Parser, Subcommand};
65+
#[cfg(all(test, nightly))]
66+
#[global_allocator]
67+
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
6468

6569
const CARGO_PKG_NAME: &str = env!("CARGO_PKG_NAME");
6670
const CARGO_PKG_VERSION: &str = env!("CARGO_PKG_VERSION");
@@ -109,15 +113,6 @@ static CONFIG_PATH: Lazy<PathBuf> = Lazy::new(|| {
109113

110114
static 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)]
122117
struct Stats {
123118
total_request: Arc<AtomicU64>,

0 commit comments

Comments
 (0)