mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-25 07:17:40 +01:00
Drop redundant generic bounds when the trait requires the bounds
This commit is contained in:
parent
e82318d374
commit
401d03599d
1 changed files with 2 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue