Fixing clippy warnings
This commit is contained in:
@@ -19,6 +19,7 @@ use std::net::SocketAddr;
|
||||
use std::collections::{HashSet, HashMap, BTreeMap, VecDeque};
|
||||
use std::mem;
|
||||
use std::cmp;
|
||||
use std::default::Default;
|
||||
use mio::*;
|
||||
use mio::udp::*;
|
||||
use sha3::*;
|
||||
@@ -62,8 +63,14 @@ struct NodeBucket {
|
||||
nodes: VecDeque<BucketEntry>, //sorted by last active
|
||||
}
|
||||
|
||||
impl Default for NodeBucket {
|
||||
fn default() -> Self {
|
||||
NodeBucket::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl NodeBucket {
|
||||
fn new() -> NodeBucket {
|
||||
fn new() -> Self {
|
||||
NodeBucket {
|
||||
nodes: VecDeque::new()
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ use std::ops::*;
|
||||
use std::cmp::min;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::io::{Read, Write};
|
||||
use std::default::Default;
|
||||
use std::fs;
|
||||
use mio::*;
|
||||
use mio::tcp::*;
|
||||
@@ -75,9 +76,15 @@ pub struct NetworkConfiguration {
|
||||
pub ideal_peers: u32,
|
||||
}
|
||||
|
||||
impl Default for NetworkConfiguration {
|
||||
fn default() -> Self {
|
||||
NetworkConfiguration::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl NetworkConfiguration {
|
||||
/// Create a new instance of default settings.
|
||||
pub fn new() -> NetworkConfiguration {
|
||||
pub fn new() -> Self {
|
||||
NetworkConfiguration {
|
||||
config_path: None,
|
||||
listen_address: None,
|
||||
|
||||
Reference in New Issue
Block a user