Skip to content

Commit

Permalink
Clippy derive Eq if PartialEq already derived.
Browse files Browse the repository at this point in the history
  • Loading branch information
darnuria authored and bluejekyll committed Aug 18, 2022
1 parent 538ab59 commit 77dcadc
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion crates/client/src/op/lower_query.rs
Expand Up @@ -13,7 +13,7 @@ use crate::rr::{DNSClass, LowerName, RecordType};
use crate::serialize::binary::*;

/// Identical to [crate::op::Query], except that the Name is guaranteed to be in lower case form
#[derive(Clone, Debug, PartialEq)]
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct LowerQuery {
name: LowerName,
original: Query,
Expand Down
2 changes: 1 addition & 1 deletion crates/proto/src/op/edns.rs
Expand Up @@ -27,7 +27,7 @@ use crate::serialize::binary::{BinEncodable, BinEncoder};

/// Edns implements the higher level concepts for working with extended dns as it is used to create or be
/// created from OPT record data.
#[derive(Debug, PartialEq, Clone)]
#[derive(Debug, PartialEq, Eq, Clone)]
pub struct Edns {
// high 8 bits that make up the 12 bit total field when included with the 4bit rcode from the
// header (from TTL)
Expand Down
4 changes: 2 additions & 2 deletions crates/proto/src/op/message.rs
Expand Up @@ -61,7 +61,7 @@ use crate::{
///
/// By default Message is a Query. Use the Message::as_update() to create and update, or
/// Message::new_update()
#[derive(Clone, Debug, PartialEq, Default)]
#[derive(Clone, Debug, PartialEq, Eq, Default)]
pub struct Message {
header: Header,
queries: Vec<Query>,
Expand Down Expand Up @@ -764,7 +764,7 @@ impl Message {
/// let msg = Message::new();
/// let MessageParts { queries, .. } = msg.into_parts();
/// ```
#[derive(Clone, Debug, PartialEq, Default)]
#[derive(Clone, Debug, PartialEq, Eq, Default)]
pub struct MessageParts {
/// message header
pub header: Header,
Expand Down
2 changes: 1 addition & 1 deletion crates/proto/src/rr/dnssec/ec_public_key.rs
Expand Up @@ -9,7 +9,7 @@ use super::Algorithm;
use crate::error::*;

#[allow(unreachable_pub)]
#[derive(Clone, Copy, PartialEq)]
#[derive(Clone, Copy, PartialEq, Eq)]
pub struct ECPublicKey {
buf: [u8; MAX_LEN],
len: usize,
Expand Down
4 changes: 2 additions & 2 deletions crates/proto/src/rr/rr_set.rs
Expand Up @@ -17,7 +17,7 @@ use crate::rr::{DNSClass, Name, RData, Record, RecordType};
use crate::rr::dnssec::SupportedAlgorithms;

/// Set of resource records associated to a name and type
#[derive(Clone, Debug, PartialEq)]
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct RecordSet {
name: Name,
record_type: RecordType,
Expand Down Expand Up @@ -446,7 +446,7 @@ impl RecordSet {

/// Consumes `RecordSet` giving public access to fields of `RecordSet` so they can
/// be destructured and taken by value
#[derive(Clone, Debug, PartialEq)]
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct RecordSetParts {
pub name: Name,
pub record_type: RecordType,
Expand Down
2 changes: 1 addition & 1 deletion crates/proto/src/xfer/dns_request.rs
Expand Up @@ -44,7 +44,7 @@ impl Default for DnsRequestOptions {
/// A DNS request object
///
/// This wraps a DNS Message for requests. It also has request options associated for controlling certain features of the DNS protocol handlers.
#[derive(Clone, PartialEq)]
#[derive(Clone, PartialEq, Eq)]
pub struct DnsRequest {
message: Message,
options: DnsRequestOptions,
Expand Down
2 changes: 1 addition & 1 deletion crates/server/src/authority/message_request.rs
Expand Up @@ -233,7 +233,7 @@ impl<'q> BinDecodable<'q> for MessageRequest {
}

/// A set of Queries with the associated serialized data
#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub struct Queries {
queries: Vec<LowerQuery>,
original: Box<[u8]>,
Expand Down
8 changes: 4 additions & 4 deletions crates/server/src/config/dnssec.rs
Expand Up @@ -24,7 +24,7 @@ use crate::client::rr::{
};

/// Key pair configuration for DNSSec keys for signing a zone
#[derive(Deserialize, PartialEq, Debug)]
#[derive(Deserialize, PartialEq, Eq, Debug)]
pub struct KeyConfig {
/// file path to the key
pub key_path: String,
Expand Down Expand Up @@ -168,7 +168,7 @@ impl KeyConfig {
}

/// Certificate format of the file being read
#[derive(Deserialize, PartialEq, Debug, Clone, Copy)]
#[derive(Deserialize, PartialEq, Eq, Debug, Clone, Copy)]
#[serde(rename_all = "snake_case")]
#[non_exhaustive]
pub enum CertType {
Expand All @@ -185,7 +185,7 @@ impl Default for CertType {
}

/// Format of the private key file to read
#[derive(Deserialize, PartialEq, Debug, Clone, Copy)]
#[derive(Deserialize, PartialEq, Eq, Debug, Clone, Copy)]
#[serde(rename_all = "snake_case")]
#[non_exhaustive]
pub enum PrivateKeyType {
Expand All @@ -202,7 +202,7 @@ impl Default for PrivateKeyType {
}

/// Configuration for a TLS certificate
#[derive(Deserialize, PartialEq, Debug)]
#[derive(Deserialize, PartialEq, Eq, Debug)]
pub struct TlsCertConfig {
path: String,
endpoint_name: String,
Expand Down
2 changes: 1 addition & 1 deletion crates/server/src/config/mod.rs
Expand Up @@ -154,7 +154,7 @@ impl FromStr for Config {
}

/// Configuration for a zone
#[derive(Deserialize, PartialEq, Debug)]
#[derive(Deserialize, PartialEq, Eq, Debug)]
pub struct ZoneConfig {
/// name of the zone
pub zone: String, // TODO: make Domain::Name decodable
Expand Down
2 changes: 1 addition & 1 deletion crates/server/src/store/config.rs
Expand Up @@ -16,7 +16,7 @@ use crate::store::forwarder::ForwardConfig;
use crate::store::sqlite::SqliteConfig;

/// Enumeration over all Store configurations
#[derive(Deserialize, PartialEq, Debug)]
#[derive(Deserialize, PartialEq, Eq, Debug)]
#[serde(tag = "type")]
#[serde(rename_all = "lowercase")]
#[non_exhaustive]
Expand Down
2 changes: 1 addition & 1 deletion crates/server/src/store/file/config.rs
Expand Up @@ -8,7 +8,7 @@
use serde::Deserialize;

/// Configuration for file based zones
#[derive(Deserialize, PartialEq, Debug)]
#[derive(Deserialize, PartialEq, Eq, Debug)]
pub struct FileConfig {
/// path to the zone file
pub zone_file_path: String,
Expand Down
2 changes: 1 addition & 1 deletion crates/server/src/store/forwarder/config.rs
Expand Up @@ -10,7 +10,7 @@ use serde::Deserialize;
use crate::resolver::config::{NameServerConfigGroup, ResolverOpts};

/// Configuration for file based zones
#[derive(Clone, Deserialize, PartialEq, Debug)]
#[derive(Clone, Deserialize, PartialEq, Eq, Debug)]
pub struct ForwardConfig {
/// upstream name_server configurations
pub name_servers: NameServerConfigGroup,
Expand Down
2 changes: 1 addition & 1 deletion crates/server/src/store/sqlite/config.rs
Expand Up @@ -8,7 +8,7 @@
use serde::Deserialize;

/// Configuration for zone file for sqlite based zones
#[derive(Deserialize, PartialEq, Debug)]
#[derive(Deserialize, PartialEq, Eq, Debug)]
pub struct SqliteConfig {
/// path to initial zone file
pub zone_file_path: String,
Expand Down

0 comments on commit 77dcadc

Please sign in to comment.