From: Matt Corallo Date: Wed, 22 Sep 2021 23:45:27 +0000 (+0000) Subject: Drop redundant generic bounds when the trait requires the bounds X-Git-Tag: v0.0.101~2^2~1 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=401d03599d2ad5b7a446eeee2ccb670b47636895;p=rust-lightning Drop redundant generic bounds when the trait requires the bounds --- diff --git a/lightning/src/ln/peer_handler.rs b/lightning/src/ln/peer_handler.rs index 22568e506..68751f30e 100644 --- a/lightning/src/ln/peer_handler.rs +++ b/lightning/src/ln/peer_handler.rs @@ -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 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 P } /// Append a message to a peer's pending outbound/write buffer, and update the map of peers needing sends accordingly. - fn enqueue_message(&self, peer: &mut Peer, message: &M) { + fn enqueue_message(&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;