From c133a2fd3537e3037b6499a97416f290b51157ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Sat, 12 Mar 2016 10:07:55 +0100 Subject: [PATCH] Fixing warnings --- ethcore/src/client/test_client.rs | 8 +++++++- util/src/keys/store.rs | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index 207f1090f..9b311081c 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -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()), diff --git a/util/src/keys/store.rs b/util/src/keys/store.rs index 6a5efc87d..37786be8b 100644 --- a/util/src/keys/store.rs +++ b/util/src/keys/store.rs @@ -120,9 +120,15 @@ impl AccountProvider for AccountService { } } +impl Default for AccountService { + fn default() -> Self { + AccountService::new() + } +} + impl AccountService { /// New account service with the default location - pub fn new() -> AccountService { + pub fn new() -> Self { let secret_store = RwLock::new(SecretStore::new()); secret_store.write().unwrap().try_import_existing(); AccountService {