From 2d93d13f347f167b3ec99b9247bcf21d9392bd13 Mon Sep 17 00:00:00 2001 From: Niklas Date: Tue, 14 Dec 2021 09:49:32 +0100 Subject: [PATCH 1/2] [http client]: re-export transport types. Closing #605 --- http-client/src/lib.rs | 6 ++++-- http-client/src/transport.rs | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/http-client/src/lib.rs b/http-client/src/lib.rs index 43180c5d66..ba4e1cd2eb 100644 --- a/http-client/src/lib.rs +++ b/http-client/src/lib.rs @@ -35,10 +35,12 @@ //! [`async-std`](https://docs.rs/async-std/), [`smol`](https://docs.rs/smol) and similar. mod client; -mod transport; + +/// HTTP transport. +pub mod transport; #[cfg(test)] mod tests; pub use client::{HttpClient, HttpClientBuilder}; -pub use jsonrpsee_types as types; +pub use jsonrpsee_types as types; \ No newline at end of file diff --git a/http-client/src/transport.rs b/http-client/src/transport.rs index 73daa3a703..f0288854ba 100644 --- a/http-client/src/transport.rs +++ b/http-client/src/transport.rs @@ -36,7 +36,7 @@ impl HyperClient { /// HTTP Transport Client. #[derive(Debug, Clone)] -pub(crate) struct HttpTransportClient { +pub struct HttpTransportClient { /// Target to connect to. target: Uri, /// HTTP client @@ -128,7 +128,7 @@ impl HttpTransportClient { /// Error that can happen during a request. #[derive(Debug, Error)] -pub(crate) enum Error { +pub enum Error { /// Invalid URL. #[error("Invalid Url: {0}")] Url(String), From 77d4be216f1e2620530c9df3cf0c918b406f6371 Mon Sep 17 00:00:00 2001 From: Niklas Date: Tue, 14 Dec 2021 11:15:32 +0100 Subject: [PATCH 2/2] cargo fmt --- http-client/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http-client/src/lib.rs b/http-client/src/lib.rs index ba4e1cd2eb..1457dd2e0e 100644 --- a/http-client/src/lib.rs +++ b/http-client/src/lib.rs @@ -43,4 +43,4 @@ pub mod transport; mod tests; pub use client::{HttpClient, HttpClientBuilder}; -pub use jsonrpsee_types as types; \ No newline at end of file +pub use jsonrpsee_types as types;