Fixing warnings
This commit is contained in:
@@ -523,7 +523,7 @@ mod tests {
|
||||
let engine = spec.to_engine().unwrap();
|
||||
let mut config = BlockQueueConfig::default();
|
||||
config.max_mem_use = super::MIN_MEM_LIMIT; // empty queue uses about 15000
|
||||
let mut queue = BlockQueue::new(config, Arc::new(engine), IoChannel::disconnected());
|
||||
let queue = BlockQueue::new(config, Arc::new(engine), IoChannel::disconnected());
|
||||
assert!(!queue.queue_info().is_full());
|
||||
let mut blocks = get_good_dummy_block_seq(50);
|
||||
for b in blocks.drain(..) {
|
||||
|
||||
@@ -28,9 +28,15 @@ pub struct MemoryCache {
|
||||
blooms: HashMap<BloomIndex, H2048>,
|
||||
}
|
||||
|
||||
impl Default for MemoryCache {
|
||||
fn default() -> Self {
|
||||
MemoryCache::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl MemoryCache {
|
||||
/// Default constructor for MemoryCache
|
||||
pub fn new() -> MemoryCache {
|
||||
pub fn new() -> Self {
|
||||
MemoryCache { blooms: HashMap::new() }
|
||||
}
|
||||
|
||||
|
||||
@@ -55,9 +55,15 @@ pub enum EachBlockWith {
|
||||
UncleAndTransaction
|
||||
}
|
||||
|
||||
impl Default for TestBlockChainClient {
|
||||
fn default() -> Self {
|
||||
TestBlockChainClient::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl TestBlockChainClient {
|
||||
/// Creates new test client.
|
||||
pub fn new() -> TestBlockChainClient {
|
||||
pub fn new() -> Self {
|
||||
|
||||
let mut client = TestBlockChainClient {
|
||||
blocks: RwLock::new(HashMap::new()),
|
||||
|
||||
@@ -301,8 +301,14 @@ mod tests {
|
||||
env_info: EnvInfo
|
||||
}
|
||||
|
||||
impl Default for TestSetup {
|
||||
fn default() -> Self {
|
||||
TestSetup::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl TestSetup {
|
||||
fn new() -> TestSetup {
|
||||
fn new() -> Self {
|
||||
TestSetup {
|
||||
state: get_temp_state(),
|
||||
engine: get_test_spec().to_engine().unwrap(),
|
||||
|
||||
@@ -255,8 +255,14 @@ mod tests {
|
||||
numbers: HashMap<BlockNumber, H256>,
|
||||
}
|
||||
|
||||
impl Default for TestBlockChain {
|
||||
fn default() -> Self {
|
||||
TestBlockChain::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl TestBlockChain {
|
||||
pub fn new() -> TestBlockChain {
|
||||
pub fn new() -> Self {
|
||||
TestBlockChain {
|
||||
blocks: HashMap::new(),
|
||||
numbers: HashMap::new(),
|
||||
|
||||
Reference in New Issue
Block a user