Skip to content

Commit 401d035

Browse files
committed
Drop redundant generic bounds when the trait requires the bounds
1 parent e82318d commit 401d035

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lightning/src/ln/peer_handler.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ use routing::network_graph::NetGraphMsgHandler;
3232
use prelude::*;
3333
use io;
3434
use alloc::collections::LinkedList;
35-
use alloc::fmt::Debug;
3635
use sync::{Arc, Mutex};
3736
use core::sync::atomic::{AtomicUsize, Ordering};
3837
use core::{cmp, hash, fmt, mem};
@@ -470,7 +469,7 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, L: Deref, CMH: Deref> P
470469
CM::Target: ChannelMessageHandler,
471470
RM::Target: RoutingMessageHandler,
472471
L::Target: Logger,
473-
CMH::Target: CustomMessageHandler + wire::CustomMessageReader {
472+
CMH::Target: CustomMessageHandler {
474473
/// Constructs a new PeerManager with the given message handlers and node_id secret key
475474
/// ephemeral_random_data is used to derive per-connection ephemeral keys and must be
476475
/// cryptographically secure random bytes.
@@ -720,7 +719,7 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, L: Deref, CMH: Deref> P
720719
}
721720

722721
/// Append a message to a peer's pending outbound/write buffer, and update the map of peers needing sends accordingly.
723-
fn enqueue_message<M: wire::Type + Writeable + Debug>(&self, peer: &mut Peer, message: &M) {
722+
fn enqueue_message<M: wire::Type>(&self, peer: &mut Peer, message: &M) {
724723
let mut buffer = VecWriter(Vec::with_capacity(2048));
725724
wire::write(message, &mut buffer).unwrap(); // crash if the write failed
726725
let encoded_message = buffer.0;

0 commit comments

Comments
 (0)