diff --git a/hipcheck/src/data/github/code_search.rs b/hipcheck/src/data/github/code_search.rs index 45fe0764..e3f5ff8c 100644 --- a/hipcheck/src/data/github/code_search.rs +++ b/hipcheck/src/data/github/code_search.rs @@ -3,7 +3,7 @@ use crate::error::Error; use crate::error::Result; use crate::hc_error; -use crate::http::authenticated_agent::AuthenticatedAgent; +use crate::util::http::authenticated_agent::AuthenticatedAgent; use serde_json::Value; const GH_API_V4_SEARCH: &str = "https://api.github.com/search/code"; diff --git a/hipcheck/src/data/github/graphql.rs b/hipcheck/src/data/github/graphql.rs index 8b58083c..b86e0405 100644 --- a/hipcheck/src/data/github/graphql.rs +++ b/hipcheck/src/data/github/graphql.rs @@ -9,7 +9,7 @@ use crate::data::github::data::*; use crate::error::Error; use crate::error::Result; use crate::hc_error; -use crate::http::authenticated_agent::AuthenticatedAgent; +use crate::util::http::authenticated_agent::AuthenticatedAgent; use graphql_client::GraphQLQuery; use graphql_client::QueryBody; use graphql_client::Response; diff --git a/hipcheck/src/data/github/graphql_pr.rs b/hipcheck/src/data/github/graphql_pr.rs index 4d99693f..19615e06 100644 --- a/hipcheck/src/data/github/graphql_pr.rs +++ b/hipcheck/src/data/github/graphql_pr.rs @@ -11,7 +11,7 @@ use crate::data::github::data::*; use crate::error::Error; use crate::error::Result; use crate::hc_error; -use crate::http::authenticated_agent::AuthenticatedAgent; +use crate::util::http::authenticated_agent::AuthenticatedAgent; use chrono::DateTime; use graphql_client::GraphQLQuery; use graphql_client::QueryBody; diff --git a/hipcheck/src/data/github/mod.rs b/hipcheck/src/data/github/mod.rs index 4541bca6..aac90569 100644 --- a/hipcheck/src/data/github/mod.rs +++ b/hipcheck/src/data/github/mod.rs @@ -12,7 +12,7 @@ use crate::data::github::data::*; use crate::data::github::graphql::get_all_reviews; use crate::data::github::graphql_pr::get_all_pr_reviews; use crate::error::Result; -use crate::http::authenticated_agent::AuthenticatedAgent; +use crate::util::http::authenticated_agent::AuthenticatedAgent; use std::sync::Arc; pub struct GitHub<'a> { diff --git a/hipcheck/src/git2_rustls_transport.rs b/hipcheck/src/git2_rustls_transport.rs index de08c158..4d227637 100644 --- a/hipcheck/src/git2_rustls_transport.rs +++ b/hipcheck/src/git2_rustls_transport.rs @@ -4,8 +4,8 @@ //! //! . -use crate::http::agent; use crate::shell::Shell; +use crate::util::http::agent; use base64::prelude::BASE64_STANDARD; use base64::Engine; use dialoguer::{Input, Password}; diff --git a/hipcheck/src/main.rs b/hipcheck/src/main.rs index 74e70077..13f3b070 100644 --- a/hipcheck/src/main.rs +++ b/hipcheck/src/main.rs @@ -13,7 +13,6 @@ mod data; mod error; mod git2_log_shim; mod git2_rustls_transport; -mod http; mod log_bridge; mod metric; mod report; diff --git a/hipcheck/src/session/pm.rs b/hipcheck/src/session/pm.rs index d21020cd..20078441 100644 --- a/hipcheck/src/session/pm.rs +++ b/hipcheck/src/session/pm.rs @@ -5,8 +5,8 @@ use crate::context::Context as _; use crate::error::Error; use crate::error::Result; use crate::hc_error; -use crate::http::agent; use crate::target::{Package, PackageHost}; +use crate::util::http::agent; use crate::CheckKind; use crate::EXIT_FAILURE; use serde_json::Value; diff --git a/hipcheck/src/setup.rs b/hipcheck/src/setup.rs index 00a331ce..1fcdcefd 100644 --- a/hipcheck/src/setup.rs +++ b/hipcheck/src/setup.rs @@ -1,7 +1,7 @@ use crate::cli::SetupArgs; use crate::error::Result; use crate::hc_error; -use crate::http::agent; +use crate::util::http::agent; use regex::Regex; use std::fs::File; use std::path::{Path, PathBuf}; diff --git a/hipcheck/src/http/agent.rs b/hipcheck/src/util/http/agent.rs similarity index 100% rename from hipcheck/src/http/agent.rs rename to hipcheck/src/util/http/agent.rs diff --git a/hipcheck/src/http/authenticated_agent.rs b/hipcheck/src/util/http/authenticated_agent.rs similarity index 100% rename from hipcheck/src/http/authenticated_agent.rs rename to hipcheck/src/util/http/authenticated_agent.rs diff --git a/hipcheck/src/http.rs b/hipcheck/src/util/http/mod.rs similarity index 100% rename from hipcheck/src/http.rs rename to hipcheck/src/util/http/mod.rs diff --git a/hipcheck/src/util/mod.rs b/hipcheck/src/util/mod.rs index 666dd909..b47a8a87 100644 --- a/hipcheck/src/util/mod.rs +++ b/hipcheck/src/util/mod.rs @@ -3,6 +3,7 @@ //! Utility methods and types used throughout Hipcheck. pub mod fs; +pub mod http; pub mod iter; pub mod redacted; #[cfg(test)]