Fixing clippy warnings. When building on nightly it is required to enable clippy
This commit is contained in:
@@ -507,7 +507,7 @@ impl<Message> Host<Message> where Message: Send + Sync + Clone {
|
||||
debug!(target: "network", "Connecting peers: {} sessions, {} pending", self.session_count(), self.handshake_count());
|
||||
}
|
||||
|
||||
#[cfg_attr(feature="dev", allow(single_match))]
|
||||
#[cfg_attr(all(nightly, feature="dev"), allow(single_match))]
|
||||
fn connect_peer(&self, id: &NodeId, io: &IoContext<NetworkIoMessage<Message>>) {
|
||||
if self.have_session(id)
|
||||
{
|
||||
@@ -542,7 +542,7 @@ impl<Message> Host<Message> where Message: Send + Sync + Clone {
|
||||
self.create_connection(socket, Some(id), io);
|
||||
}
|
||||
|
||||
#[cfg_attr(feature="dev", allow(block_in_if_condition_stmt))]
|
||||
#[cfg_attr(all(nightly, feature="dev"), allow(block_in_if_condition_stmt))]
|
||||
fn create_connection(&self, socket: TcpStream, id: Option<&NodeId>, io: &IoContext<NetworkIoMessage<Message>>) {
|
||||
let nonce = self.info.write().unwrap().next_nonce();
|
||||
let mut handshakes = self.handshakes.write().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user