diff --git a/backend/src/connector/mod.rs b/backend/src/connector/mod.rs index 1fa1064f..f77c6b88 100644 --- a/backend/src/connector/mod.rs +++ b/backend/src/connector/mod.rs @@ -3,13 +3,13 @@ mod prelude { context::{BodyExt, ContextWrapper, DropContextService, Has}, ClientError, Connector, }; - pub use crate::{models::shared::XSpanIdString, prelude::*}; - pub use axum::headers::Authorization; - pub use axum::headers::{authorization::Credentials, HeaderMapExt}; - pub use axum::http::{HeaderName, HeaderValue}; + pub use crate::{models::shared::XSpanIdString, prelude::*, services::auth::HttpClient}; + pub use axum::{ + headers::{authorization::Credentials, Authorization, HeaderMapExt}, + http::{HeaderName, HeaderValue}, + }; pub use futures::{Stream, StreamExt}; - pub use hyper::body::Bytes; - pub use hyper::{service::Service, Response, Uri}; + pub use hyper::{body::Bytes, service::Service, Response, Uri}; pub use std::{ str::FromStr, sync::Arc, @@ -22,8 +22,6 @@ use client::Client; use context::ClientContext; use prelude::*; -use crate::services::auth::HttpClient; - pub mod api; pub mod client; pub mod context; diff --git a/backend/src/lib.rs b/backend/src/lib.rs index bd5ec0b8..ab452228 100644 --- a/backend/src/lib.rs +++ b/backend/src/lib.rs @@ -100,7 +100,7 @@ pub mod prelude { pub use error_stack::{Context, Report, Result, ResultExt}; pub use hyper::{client::HttpConnector, Body, Method, Request, StatusCode}; pub use serde::{Deserialize, Serialize}; - pub use std::{collections::HashMap, hash::Hash, marker::PhantomData}; + pub use std::{collections::HashMap, hash::Hash, marker::PhantomData, str::FromStr}; pub use thiserror::Error; pub use utoipa::{IntoParams, OpenApi, ToSchema}; pub use uuid::Uuid; diff --git a/backend/src/models/mod.rs b/backend/src/models/mod.rs index 64dbd49d..39107f58 100644 --- a/backend/src/models/mod.rs +++ b/backend/src/models/mod.rs @@ -4,4 +4,6 @@ pub mod shared; pub mod prelude { pub use crate::prelude::*; + pub use hyper::Uri; + pub use std::{net::SocketAddr, time::Duration}; } diff --git a/backend/src/models/shared.rs b/backend/src/models/shared.rs index ce2e92b5..eeca6367 100644 --- a/backend/src/models/shared.rs +++ b/backend/src/models/shared.rs @@ -1,9 +1,5 @@ -use hyper::Uri; - use super::prelude::*; use std::result::Result; -use std::str::FromStr; -use std::{net::SocketAddr, time::Duration}; #[derive(ToSchema, Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct Hostname( diff --git a/backend/src/router.rs b/backend/src/router.rs index 351bf62f..f491098f 100644 --- a/backend/src/router.rs +++ b/backend/src/router.rs @@ -2,13 +2,9 @@ use crate::prelude::*; use axum::body::HttpBody; use axum::routing::on; use axum::{handler::Handler, routing::MethodFilter, Router}; -use hyper::{Body, Method}; use std::convert::Infallible; -use std::marker::PhantomData; use std::ops::Deref; -use thiserror::Error; use utoipa::openapi::PathItemType; -use utoipa::OpenApi; #[derive(Clone, Debug, Error, PartialEq, Eq, PartialOrd, Ord)] pub enum RouteError {