Skip to content

Commit

Permalink
make noop_client private
Browse files Browse the repository at this point in the history
  • Loading branch information
cataggar committed Jan 10, 2024
1 parent a5e2c39 commit 4fd16c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions sdk/core/src/http_client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mod noop;
mod reqwest;

#[cfg(not(any(feature = "enable_reqwest", feature = "enable_reqwest_rustls")))]
pub use self::noop::{new_noop_client, NoopClient};
use self::noop::new_noop_client;
#[cfg(any(feature = "enable_reqwest", feature = "enable_reqwest_rustls"))]
use self::reqwest::new_reqwest_client;
use crate::error::ErrorKind;
Expand All @@ -21,7 +21,7 @@ pub fn new_http_client() -> Arc<dyn HttpClient> {
}
#[cfg(not(any(feature = "enable_reqwest", feature = "enable_reqwest_rustls")))]
{
Arc::new(NoopClient)
new_noop_client()
}
}

Expand Down
4 changes: 2 additions & 2 deletions sdk/core/src/http_client/noop.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use async_trait::async_trait;

#[derive(Debug)]
pub struct NoopClient;
struct NoopClient;

pub fn new_noop_client() -> std::sync::Arc<dyn crate::HttpClient> {
pub(crate) fn new_noop_client() -> std::sync::Arc<dyn crate::HttpClient> {
std::sync::Arc::new(NoopClient)
}

Expand Down
2 changes: 0 additions & 2 deletions sdk/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ pub use error::{Error, Result};
#[doc(inline)]
pub use headers::Header;
pub use http_client::{from_json, new_http_client, to_json, HttpClient};
#[cfg(not(any(feature = "enable_reqwest", feature = "enable_reqwest_rustls")))]
pub use http_client::{new_noop_client, NoopClient};
pub use models::*;
pub use options::*;
pub use pageable::*;
Expand Down

0 comments on commit 4fd16c4

Please sign in to comment.