fix(build): clippy warning for must_use (#892)
This commit is contained in:
@@ -82,12 +82,14 @@ pub fn generate<T: Service>(
|
|||||||
///
|
///
|
||||||
/// This requires the server to support it otherwise it might respond with an
|
/// This requires the server to support it otherwise it might respond with an
|
||||||
/// error.
|
/// error.
|
||||||
|
#[must_use]
|
||||||
pub fn send_gzip(mut self) -> Self {
|
pub fn send_gzip(mut self) -> Self {
|
||||||
self.inner = self.inner.send_gzip();
|
self.inner = self.inner.send_gzip();
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Enable decompressing responses with `gzip`.
|
/// Enable decompressing responses with `gzip`.
|
||||||
|
#[must_use]
|
||||||
pub fn accept_gzip(mut self) -> Self {
|
pub fn accept_gzip(mut self) -> Self {
|
||||||
self.inner = self.inner.accept_gzip();
|
self.inner = self.inner.accept_gzip();
|
||||||
self
|
self
|
||||||
|
|||||||
@@ -50,12 +50,14 @@ pub fn generate<T: Service>(
|
|||||||
let configure_compression_methods = if compression_enabled {
|
let configure_compression_methods = if compression_enabled {
|
||||||
quote! {
|
quote! {
|
||||||
/// Enable decompressing requests with `gzip`.
|
/// Enable decompressing requests with `gzip`.
|
||||||
|
#[must_use]
|
||||||
pub fn accept_gzip(mut self) -> Self {
|
pub fn accept_gzip(mut self) -> Self {
|
||||||
self.accept_compression_encodings.enable_gzip();
|
self.accept_compression_encodings.enable_gzip();
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compress responses with `gzip`, if the client supports it.
|
/// Compress responses with `gzip`, if the client supports it.
|
||||||
|
#[must_use]
|
||||||
pub fn send_gzip(mut self) -> Self {
|
pub fn send_gzip(mut self) -> Self {
|
||||||
self.send_compression_encodings.enable_gzip();
|
self.send_compression_encodings.enable_gzip();
|
||||||
self
|
self
|
||||||
|
|||||||
Reference in New Issue
Block a user