Fixing warnings

This commit is contained in:
Tomasz Drwięga 2016-03-12 10:07:55 +01:00
parent e10457d235
commit c133a2fd35
2 changed files with 14 additions and 2 deletions

View File

@ -55,9 +55,15 @@ pub enum EachBlockWith {
UncleAndTransaction UncleAndTransaction
} }
impl Default for TestBlockChainClient {
fn default() -> Self {
TestBlockChainClient::new()
}
}
impl TestBlockChainClient { impl TestBlockChainClient {
/// Creates new test client. /// Creates new test client.
pub fn new() -> TestBlockChainClient { pub fn new() -> Self {
let mut client = TestBlockChainClient { let mut client = TestBlockChainClient {
blocks: RwLock::new(HashMap::new()), blocks: RwLock::new(HashMap::new()),

View File

@ -120,9 +120,15 @@ impl AccountProvider for AccountService {
} }
} }
impl Default for AccountService {
fn default() -> Self {
AccountService::new()
}
}
impl AccountService { impl AccountService {
/// New account service with the default location /// New account service with the default location
pub fn new() -> AccountService { pub fn new() -> Self {
let secret_store = RwLock::new(SecretStore::new()); let secret_store = RwLock::new(SecretStore::new());
secret_store.write().unwrap().try_import_existing(); secret_store.write().unwrap().try_import_existing();
AccountService { AccountService {