Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
archeoss committed Nov 14, 2023
1 parent c51094c commit c413f3a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 17 deletions.
14 changes: 6 additions & 8 deletions backend/src/connector/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion backend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions backend/src/models/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
}
4 changes: 0 additions & 4 deletions backend/src/models/shared.rs
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
4 changes: 0 additions & 4 deletions backend/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c413f3a

Please sign in to comment.