Drop redundant generic bounds when the trait requires the bounds
authorMatt Corallo <git@bluematt.me>
Wed, 22 Sep 2021 23:45:27 +0000 (23:45 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 22 Sep 2021 23:46:40 +0000 (23:46 +0000)
lightning/src/ln/peer_handler.rs

index 22568e506668f127a3f8d179f8df356d383724cd..68751f30ef11b2b83d507fd4f84c5343405288d8 100644 (file)
@@ -32,7 +32,6 @@ use routing::network_graph::NetGraphMsgHandler;
 use prelude::*;
 use io;
 use alloc::collections::LinkedList;
-use alloc::fmt::Debug;
 use sync::{Arc, Mutex};
 use core::sync::atomic::{AtomicUsize, Ordering};
 use core::{cmp, hash, fmt, mem};
@@ -470,7 +469,7 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, L: Deref, CMH: Deref> P
                CM::Target: ChannelMessageHandler,
                RM::Target: RoutingMessageHandler,
                L::Target: Logger,
-               CMH::Target: CustomMessageHandler + wire::CustomMessageReader {
+               CMH::Target: CustomMessageHandler {
        /// Constructs a new PeerManager with the given message handlers and node_id secret key
        /// ephemeral_random_data is used to derive per-connection ephemeral keys and must be
        /// cryptographically secure random bytes.
@@ -720,7 +719,7 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, L: Deref, CMH: Deref> P
        }
 
        /// Append a message to a peer's pending outbound/write buffer, and update the map of peers needing sends accordingly.
-       fn enqueue_message<M: wire::Type + Writeable + Debug>(&self, peer: &mut Peer, message: &M) {
+       fn enqueue_message<M: wire::Type>(&self, peer: &mut Peer, message: &M) {
                let mut buffer = VecWriter(Vec::with_capacity(2048));
                wire::write(message, &mut buffer).unwrap(); // crash if the write failed
                let encoded_message = buffer.0;