fix(build): clippy warning for must_use (#892)

This commit is contained in:
cssivision
2022-01-27 11:44:25 -05:00
committed by GitHub
parent 2b0ffee620
commit a337f132a5
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -82,12 +82,14 @@ pub fn generate<T: Service>(
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
/// Enable decompressing responses with `gzip`.
#[must_use]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
+2
View File
@@ -50,12 +50,14 @@ pub fn generate<T: Service>(
let configure_compression_methods = if compression_enabled {
quote! {
/// Enable decompressing requests with `gzip`.
#[must_use]
pub fn accept_gzip(mut self) -> Self {
self.accept_compression_encodings.enable_gzip();
self
}
/// Compress responses with `gzip`, if the client supports it.
#[must_use]
pub fn send_gzip(mut self) -> Self {
self.send_compression_encodings.enable_gzip();
self