mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-19 13:01:22 +00:00
*: Fix clippy::derive-partial-eq-without-eq
(#2818)
This commit is contained in:
@ -38,6 +38,7 @@
|
||||
#[cfg(feature = "serde")]
|
||||
extern crate _serde as serde;
|
||||
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
mod keys_proto {
|
||||
include!(concat!(env!("OUT_DIR"), "/keys_proto.rs"));
|
||||
}
|
||||
@ -46,6 +47,7 @@ mod envelope_proto {
|
||||
include!(concat!(env!("OUT_DIR"), "/envelope_proto.rs"));
|
||||
}
|
||||
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
mod peer_record_proto {
|
||||
include!(concat!(env!("OUT_DIR"), "/peer_record_proto.rs"));
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ const DOMAIN_SEP: &str = "libp2p-routing-state";
|
||||
///
|
||||
/// Peer records are designed to be distributable and carry a signature by being wrapped in a signed envelope.
|
||||
/// For more information see RFC0003 of the libp2p specifications: <https://github.com/libp2p/specs/blob/master/RFC/0003-routing-records.md>
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
pub struct PeerRecord {
|
||||
peer_id: PeerId,
|
||||
seq: u64,
|
||||
|
@ -8,7 +8,7 @@ use unsigned_varint::encode::usize_buffer;
|
||||
/// A signed envelope contains an arbitrary byte string payload, a signature of the payload, and the public key that can be used to verify the signature.
|
||||
///
|
||||
/// For more details see libp2p RFC0002: <https://github.com/libp2p/specs/blob/master/RFC/0002-signed-envelopes.md>
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct SignedEnvelope {
|
||||
key: PublicKey,
|
||||
payload_type: Vec<u8>,
|
||||
|
@ -130,7 +130,7 @@ impl ProbeId {
|
||||
}
|
||||
|
||||
/// Event produced by [`Behaviour`].
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum Event {
|
||||
/// Event on an inbound probe.
|
||||
InboundProbe(InboundProbeEvent),
|
||||
|
@ -40,7 +40,7 @@ use std::{
|
||||
};
|
||||
|
||||
/// Outbound probe failed or was aborted.
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum OutboundProbeError {
|
||||
/// Probe was aborted because no server is known, or all servers
|
||||
/// are throttled through [`Config::throttle_server_period`].
|
||||
@ -54,7 +54,7 @@ pub enum OutboundProbeError {
|
||||
Response(ResponseError),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum OutboundProbeEvent {
|
||||
/// A dial-back request was sent to a remote peer.
|
||||
Request {
|
||||
|
@ -38,7 +38,7 @@ use std::{
|
||||
};
|
||||
|
||||
/// Inbound probe failed.
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum InboundProbeError {
|
||||
/// Receiving the dial-back request or sending a response failed.
|
||||
InboundRequest(InboundFailure),
|
||||
@ -46,7 +46,7 @@ pub enum InboundProbeError {
|
||||
Response(ResponseError),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum InboundProbeEvent {
|
||||
/// A dial-back request was received from a remote peer.
|
||||
Request {
|
||||
|
@ -31,6 +31,7 @@ pub use self::{
|
||||
};
|
||||
pub use libp2p_request_response::{InboundFailure, OutboundFailure};
|
||||
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
mod structs_proto {
|
||||
include!(concat!(env!("OUT_DIR"), "/structs.rs"));
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ pub use protocol::{
|
||||
PROTOCOL_NAME,
|
||||
};
|
||||
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
mod message_proto {
|
||||
include!(concat!(env!("OUT_DIR"), "/holepunch.pb.rs"));
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ pub mod protocol;
|
||||
mod layer;
|
||||
mod topic;
|
||||
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
mod rpc_proto {
|
||||
include!(concat!(env!("OUT_DIR"), "/floodsub.pb.rs"));
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ pub enum ValidationMode {
|
||||
}
|
||||
|
||||
/// Selector for custom Protocol Id
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub enum GossipsubVersion {
|
||||
V1_0,
|
||||
V1_1,
|
||||
|
@ -17,6 +17,7 @@
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
#![allow(clippy::derive_partial_eq_without_eq)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/gossipsub.pb.rs"));
|
||||
|
||||
|
@ -86,7 +86,7 @@ declare_message_id_type!(MessageId, "MessageId");
|
||||
// filter duplicates quickly without performing the overhead of decompression.
|
||||
declare_message_id_type!(FastMessageId, "FastMessageId");
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct PeerConnections {
|
||||
/// The kind of protocol the peer supports.
|
||||
pub kind: PeerKind,
|
||||
|
@ -51,6 +51,7 @@ mod handler;
|
||||
mod identify;
|
||||
mod protocol;
|
||||
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
mod structs_proto {
|
||||
include!(concat!(env!("OUT_DIR"), "/structs.rs"));
|
||||
}
|
||||
|
@ -52,6 +52,7 @@ mod behaviour;
|
||||
mod jobs;
|
||||
mod query;
|
||||
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
mod dht_proto {
|
||||
include!(concat!(env!("OUT_DIR"), "/dht.pb.rs"));
|
||||
}
|
||||
|
@ -21,6 +21,7 @@
|
||||
//! Implementation of the [libp2p circuit relay v2
|
||||
//! specification](https://github.com/libp2p/specs/issues/314).
|
||||
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
mod message_proto {
|
||||
include!(concat!(env!("OUT_DIR"), "/message_v2.pb.rs"));
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ pub const STOP_PROTOCOL_NAME: &[u8; 32] = b"/libp2p/circuit/relay/0.2.0/stop";
|
||||
|
||||
const MAX_MESSAGE_SIZE: usize = 4096;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct Limit {
|
||||
duration: Option<Duration>,
|
||||
data_in_bytes: Option<u64>,
|
||||
|
@ -182,7 +182,7 @@ impl NewRegistration {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct Registration {
|
||||
pub namespace: Namespace,
|
||||
pub record: PeerRecord,
|
||||
@ -594,6 +594,7 @@ impl From<UnmappableStatusCode> for ConversionError {
|
||||
#[error("The response code ({0:?}) cannot be mapped to our ErrorCode enum")]
|
||||
pub struct UnmappableStatusCode(wire::message::ResponseStatus);
|
||||
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
mod wire {
|
||||
include!(concat!(env!("OUT_DIR"), "/rendezvous.pb.rs"));
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ pub enum RequestResponseEvent<TRequest, TResponse, TChannelResponse = TResponse>
|
||||
|
||||
/// Possible failures occurring in the context of sending
|
||||
/// an outbound request and receiving the response.
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum OutboundFailure {
|
||||
/// The request could not be sent because a dialing attempt failed.
|
||||
DialFailure,
|
||||
@ -184,7 +184,7 @@ impl std::error::Error for OutboundFailure {}
|
||||
|
||||
/// Possible failures occurring in the context of receiving an
|
||||
/// inbound request and sending a response.
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum InboundFailure {
|
||||
/// The inbound request timed out, either while reading the
|
||||
/// incoming request or before a response is sent, e.g. if
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
//! Noise protocol handshake I/O.
|
||||
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
mod payload_proto {
|
||||
include!(concat!(env!("OUT_DIR"), "/payload.proto.rs"));
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ use void::Void;
|
||||
|
||||
mod error;
|
||||
mod handshake;
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
mod structs_proto {
|
||||
include!(concat!(env!("OUT_DIR"), "/structs.rs"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user