Skip to content

Commit

Permalink
Add must_use to ClientBuilder & RequestBuilder (#1011)
Browse files Browse the repository at this point in the history
  • Loading branch information
zacps authored Aug 21, 2020
1 parent d42385e commit db24d54
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/async_impl/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ pub struct Client {
}

/// A `ClientBuilder` can be used to create a `Client` with custom configuration.
#[must_use]
pub struct ClientBuilder {
config: Config,
}
Expand Down
1 change: 1 addition & 0 deletions src/async_impl/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pub struct Request {
}

/// A builder to construct the properties of a `Request`.
#[must_use = "RequestBuilder does nothing until you 'send' it"]
pub struct RequestBuilder {
client: Client,
request: crate::Result<Request>,
Expand Down
1 change: 1 addition & 0 deletions src/blocking/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ pub struct Client {
/// # Ok(())
/// # }
/// ```
#[must_use]
pub struct ClientBuilder {
inner: async_impl::ClientBuilder,
timeout: Timeout,
Expand Down
1 change: 1 addition & 0 deletions src/blocking/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pub struct Request {

/// A builder to construct the properties of a `Request`.
#[derive(Debug)]
#[must_use = "RequestBuilder does nothing until you 'send' it"]
pub struct RequestBuilder {
client: Client,
request: crate::Result<Request>,
Expand Down

0 comments on commit db24d54

Please sign in to comment.