1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 18:09:22 +02:00

clippy warnings

This commit is contained in:
Nikolay Kim
2018-07-05 13:16:16 +06:00
parent 05a43a855e
commit 8058d15624
4 changed files with 19 additions and 14 deletions

View File

@ -129,8 +129,8 @@ pub enum ContentEncoding {
impl ContentEncoding {
#[inline]
/// Is the content compressed?
pub fn is_compression(&self) -> bool {
match *self {
pub fn is_compression(self) -> bool {
match self {
ContentEncoding::Identity | ContentEncoding::Auto => false,
_ => true,
}
@ -138,8 +138,8 @@ impl ContentEncoding {
#[inline]
/// Convert content encoding to string
pub fn as_str(&self) -> &'static str {
match *self {
pub fn as_str(self) -> &'static str {
match self {
#[cfg(feature = "brotli")]
ContentEncoding::Br => "br",
#[cfg(feature = "flate2")]
@ -152,8 +152,8 @@ impl ContentEncoding {
#[inline]
/// default quality value
pub fn quality(&self) -> f64 {
match *self {
pub fn quality(self) -> f64 {
match self {
#[cfg(feature = "brotli")]
ContentEncoding::Br => 1.1,
#[cfg(feature = "flate2")]