From 8acb9a201d6acb4f5f03665daff81dddf7554a99 Mon Sep 17 00:00:00 2001 From: 0xf8 <0xf8.dev@proton.me> Date: Wed, 21 Jun 2023 18:16:02 -0400 Subject: [PATCH] optimize imports --- src/server/admin/mod.rs | 7 +++---- src/server/aliases/mod.rs | 7 +++---- src/server/auth/mod.rs | 7 +++---- src/server/authlib/mod.rs | 8 ++++---- src/server/profile/mod.rs | 7 +++---- src/server/session/mod.rs | 7 +++---- 6 files changed, 19 insertions(+), 24 deletions(-) diff --git a/src/server/admin/mod.rs b/src/server/admin/mod.rs index adefd5f..7386537 100644 --- a/src/server/admin/mod.rs +++ b/src/server/admin/mod.rs @@ -9,13 +9,12 @@ * You should have received a copy of the GNU General Public License along with this program. If not, see . */ -pub use log::{info, log, warn}; -pub use tide::{Middleware, prelude::*, Request, Response, Result, utils::After}; +use log::debug; -pub use yggdrasil::*; +use yggdrasil::*; pub fn nest(db: Database) -> tide::Server { - info!("Loading nest"); + debug!("Loading nest"); let mut nest = tide::with_state(db.to_owned()); diff --git a/src/server/aliases/mod.rs b/src/server/aliases/mod.rs index 917672f..16de3f9 100644 --- a/src/server/aliases/mod.rs +++ b/src/server/aliases/mod.rs @@ -9,13 +9,12 @@ * You should have received a copy of the GNU General Public License along with this program. If not, see . */ -pub use log::{info, log, warn}; -pub use tide::{Middleware, prelude::*, Request, Response, Result, utils::After}; +use log::debug; -pub use yggdrasil::*; +use yggdrasil::*; pub fn nest(db: Database) -> tide::Server { - info!("Loading nest"); + debug!("Loading nest"); let mut nest = tide::with_state(db.to_owned()); diff --git a/src/server/auth/mod.rs b/src/server/auth/mod.rs index e57d6c3..c052508 100644 --- a/src/server/auth/mod.rs +++ b/src/server/auth/mod.rs @@ -9,10 +9,9 @@ * You should have received a copy of the GNU General Public License along with this program. If not, see . */ -pub use log::{info, log, warn}; -pub use tide::{Middleware, prelude::*, Request, Response, Result, utils::After}; +use log::debug; -pub use yggdrasil::*; +use yggdrasil::*; mod authenticate; mod invalidate; @@ -21,7 +20,7 @@ mod signout; mod validate; pub fn nest(db: Database) -> tide::Server { - info!("Loading nest"); + debug!("Loading nest"); let mut nest = tide::with_state(db); nest.at("authenticate").post(authenticate::authenticate); diff --git a/src/server/authlib/mod.rs b/src/server/authlib/mod.rs index e39194f..8d45dfe 100644 --- a/src/server/authlib/mod.rs +++ b/src/server/authlib/mod.rs @@ -9,13 +9,13 @@ * You should have received a copy of the GNU General Public License along with this program. If not, see . */ -pub use log::{info, log, warn}; -pub use tide::{Middleware, prelude::*, Request, Response, Result, utils::After}; +use log::debug; +use tide::{prelude::*, Request, Result}; -pub use yggdrasil::*; +use yggdrasil::*; pub fn nest(db: Database) -> tide::Server { - info!("Loading nest"); + debug!("Loading nest"); let mut nest = tide::with_state(db.to_owned()); diff --git a/src/server/profile/mod.rs b/src/server/profile/mod.rs index ded2b30..a1543fc 100644 --- a/src/server/profile/mod.rs +++ b/src/server/profile/mod.rs @@ -10,17 +10,16 @@ */ -pub use log::{info, log, warn}; -pub use tide::{Middleware, prelude::*, Request, Response, Result, utils::After}; +use log::debug; -pub use yggdrasil::*; +use yggdrasil::*; mod profile; mod skin; mod cape; pub fn nest(db: Database) -> tide::Server { - info!("Loading nest"); + debug!("Loading nest"); let mut nest = tide::with_state(db); diff --git a/src/server/session/mod.rs b/src/server/session/mod.rs index 6597cf0..5773b3c 100644 --- a/src/server/session/mod.rs +++ b/src/server/session/mod.rs @@ -9,17 +9,16 @@ * You should have received a copy of the GNU General Public License along with this program. If not, see . */ -pub use log::{info, log, warn}; -pub use tide::{Middleware, prelude::*, Request, Response, Result, utils::After}; +use log::debug; -pub use yggdrasil::*; +use yggdrasil::*; mod has_joined; mod join; mod profile; pub fn nest(db: Database) -> tide::Server { - info!("Loading nest"); + debug!("Loading nest"); let mut nest = tide::with_state(db.to_owned());