mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-27 07:19:04 +02:00
appease clippy by deriving Eq on a bunch of items (#2818)
This commit is contained in:
@ -42,7 +42,7 @@ pub struct BlockingError;
|
||||
impl ResponseError for crate::error::BlockingError {}
|
||||
|
||||
/// Errors which can occur when attempting to generate resource uri.
|
||||
#[derive(Debug, PartialEq, Display, Error, From)]
|
||||
#[derive(Debug, PartialEq, Eq, Display, Error, From)]
|
||||
#[non_exhaustive]
|
||||
pub enum UrlGenerationError {
|
||||
/// Resource not found.
|
||||
|
@ -37,7 +37,7 @@ fn split_once_and_trim(haystack: &str, needle: char) -> (&str, &str) {
|
||||
}
|
||||
|
||||
/// The implied disposition of the content of the HTTP body.
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum DispositionType {
|
||||
/// Inline implies default processing.
|
||||
Inline,
|
||||
@ -79,7 +79,7 @@ impl<'a> From<&'a str> for DispositionType {
|
||||
/// assert!(param.is_filename());
|
||||
/// assert_eq!(param.as_filename().unwrap(), "sample.txt");
|
||||
/// ```
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
pub enum DispositionParam {
|
||||
/// For [`DispositionType::FormData`] (i.e. *multipart/form-data*), the name of an field from
|
||||
@ -302,7 +302,7 @@ impl DispositionParam {
|
||||
/// change to match local file system conventions if applicable, and do not use directory path
|
||||
/// information that may be present.
|
||||
/// See [RFC 2183 §2.3](https://datatracker.ietf.org/doc/html/rfc2183#section-2.3).
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct ContentDisposition {
|
||||
/// The disposition type
|
||||
pub disposition: DispositionType,
|
||||
|
@ -57,7 +57,7 @@ use crate::HttpMessage;
|
||||
/// IfRange::Date(fetched.into())
|
||||
/// );
|
||||
/// ```
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub enum IfRange {
|
||||
/// The entity-tag the client has of the resource.
|
||||
EntityTag(EntityTag),
|
||||
|
@ -224,10 +224,11 @@ macro_rules! common_header {
|
||||
// List header, one or more items with "*" option
|
||||
($(#[$attrs:meta])*($id:ident, $name:expr) => {Any / ($item:ty)+}) => {
|
||||
$(#[$attrs])*
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub enum $id {
|
||||
/// Any value is a match
|
||||
Any,
|
||||
|
||||
/// Only the listed items are a match
|
||||
Items(Vec<$item>),
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ use super::{Header, HeaderName, HeaderValue, InvalidHeaderValue, TryIntoHeaderVa
|
||||
/// builder.insert_header(Range::bytes(1, 100));
|
||||
/// builder.insert_header(Range::bytes_multi(vec![(1, 100), (200, 300)]));
|
||||
/// ```
|
||||
#[derive(PartialEq, Clone, Debug)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum Range {
|
||||
/// Byte range.
|
||||
Bytes(Vec<ByteRangeSpec>),
|
||||
|
@ -73,7 +73,7 @@ use crate::{
|
||||
/// }
|
||||
/// }
|
||||
/// ```
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub enum Either<L, R> {
|
||||
/// A value of type `L`.
|
||||
Left(L),
|
||||
|
Reference in New Issue
Block a user