diff --git a/plume-common/src/activity_pub/mod.rs b/plume-common/src/activity_pub/mod.rs index 423cc4ff..67c7375f 100644 --- a/plume-common/src/activity_pub/mod.rs +++ b/plume-common/src/activity_pub/mod.rs @@ -1,6 +1,5 @@ use activitypub::{Activity, Link, Object}; use array_tool::vec::Uniq; -use tracing::{debug, warn}; use reqwest::r#async::ClientBuilder; use rocket::{ http::Status, @@ -10,6 +9,7 @@ use rocket::{ }; use serde_json; use tokio::prelude::*; +use tracing::{debug, warn}; use self::sign::Signable; diff --git a/plume-models/src/migrations.rs b/plume-models/src/migrations.rs index f7fd05dc..301ddbfe 100644 --- a/plume-models/src/migrations.rs +++ b/plume-models/src/migrations.rs @@ -1,8 +1,8 @@ use crate::{Connection, Error, Result}; use diesel::connection::{Connection as Conn, SimpleConnection}; -use tracing::info; use migrations_internals::{setup_database, MigrationConnection}; use std::path::Path; +use tracing::info; #[allow(dead_code)] //variants might not be constructed if not required by current migrations enum Action { diff --git a/src/inbox.rs b/src/inbox.rs index ecb6e0e6..059bf632 100644 --- a/src/inbox.rs +++ b/src/inbox.rs @@ -1,4 +1,3 @@ -use tracing::warn; use plume_common::activity_pub::{ inbox::FromId, request::Digest, @@ -11,6 +10,7 @@ use rocket::{data::*, http::Status, response::status, Outcome::*, Request}; use rocket_contrib::json::*; use serde::Deserialize; use std::io::Read; +use tracing::warn; pub fn handle_incoming( rockets: PlumeRocket, diff --git a/src/main.rs b/src/main.rs index 845bafac..e815e906 100755 --- a/src/main.rs +++ b/src/main.rs @@ -13,7 +13,6 @@ extern crate validator_derive; use chrono::Utc; use clap::App; use diesel::r2d2::ConnectionManager; -use tracing::warn; use plume_models::{ db_conn::{DbPool, PragmaForeignKey}, instance::Instance, @@ -28,6 +27,7 @@ use std::path::Path; use std::process::exit; use std::sync::{Arc, Mutex}; use std::time::Duration; +use tracing::warn; init_i18n!( "plume", af, ar, bg, ca, cs, cy, da, de, el, en, eo, es, fa, fi, fr, gl, he, hi, hr, hu, it, diff --git a/src/routes/errors.rs b/src/routes/errors.rs index 8549da80..7632f347 100644 --- a/src/routes/errors.rs +++ b/src/routes/errors.rs @@ -1,10 +1,10 @@ use crate::template_utils::{IntoContext, Ructe}; -use tracing::warn; use plume_models::{Error, PlumeRocket}; use rocket::{ response::{self, Responder}, Request, }; +use tracing::warn; #[derive(Debug)] pub struct ErrorPage(Error); diff --git a/src/routes/session.rs b/src/routes/session.rs index 4d1dfe73..86955f9a 100644 --- a/src/routes/session.rs +++ b/src/routes/session.rs @@ -1,6 +1,5 @@ use crate::routes::RespondOrRedirect; use lettre::Transport; -use tracing::warn; use rocket::http::ext::IntoOwned; use rocket::{ http::{uri::Uri, Cookie, Cookies, SameSite}, @@ -14,6 +13,7 @@ use std::{ sync::{Arc, Mutex}, time::Instant, }; +use tracing::warn; use validator::{Validate, ValidationError, ValidationErrors}; use crate::mail::{build_mail, Mailer}; diff --git a/src/routes/user.rs b/src/routes/user.rs index 5164442e..90baaf94 100644 --- a/src/routes/user.rs +++ b/src/routes/user.rs @@ -3,7 +3,6 @@ use activitypub::{ collection::{OrderedCollection, OrderedCollectionPage}, }; use diesel::SaveChangesDsl; -use tracing::{info, warn}; use rocket::{ http::{ContentType, Cookies}, request::LenientForm, @@ -12,6 +11,7 @@ use rocket::{ use rocket_i18n::I18n; use serde_json; use std::{borrow::Cow, collections::HashMap}; +use tracing::{info, warn}; use validator::{Validate, ValidationError, ValidationErrors}; use crate::inbox;