Add must_use to ClientBuilder & RequestBuilder (#1011)
This commit is contained in:
committed by
GitHub
parent
d42385e7f2
commit
db24d54097
@@ -63,6 +63,7 @@ pub struct Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// A `ClientBuilder` can be used to create a `Client` with custom configuration.
|
/// A `ClientBuilder` can be used to create a `Client` with custom configuration.
|
||||||
|
#[must_use]
|
||||||
pub struct ClientBuilder {
|
pub struct ClientBuilder {
|
||||||
config: Config,
|
config: Config,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ pub struct Request {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// A builder to construct the properties of a `Request`.
|
/// A builder to construct the properties of a `Request`.
|
||||||
|
#[must_use = "RequestBuilder does nothing until you 'send' it"]
|
||||||
pub struct RequestBuilder {
|
pub struct RequestBuilder {
|
||||||
client: Client,
|
client: Client,
|
||||||
request: crate::Result<Request>,
|
request: crate::Result<Request>,
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ pub struct Client {
|
|||||||
/// # Ok(())
|
/// # Ok(())
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
|
#[must_use]
|
||||||
pub struct ClientBuilder {
|
pub struct ClientBuilder {
|
||||||
inner: async_impl::ClientBuilder,
|
inner: async_impl::ClientBuilder,
|
||||||
timeout: Timeout,
|
timeout: Timeout,
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ pub struct Request {
|
|||||||
|
|
||||||
/// A builder to construct the properties of a `Request`.
|
/// A builder to construct the properties of a `Request`.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
#[must_use = "RequestBuilder does nothing until you 'send' it"]
|
||||||
pub struct RequestBuilder {
|
pub struct RequestBuilder {
|
||||||
client: Client,
|
client: Client,
|
||||||
request: crate::Result<Request>,
|
request: crate::Result<Request>,
|
||||||
|
|||||||
Reference in New Issue
Block a user