fix(compilation warns): no-default-features (#10346)

This commit is contained in:
Niklas Adolfsson
2019-02-14 15:54:44 +01:00
committed by Andronik Ordian
parent bff0bedfa9
commit 9cce6a47d4
7 changed files with 12 additions and 3 deletions

View File

@@ -58,7 +58,7 @@ pub struct ImportFromGethAccounts {
#[cfg(not(feature = "accounts"))]
pub fn execute(cmd: AccountCmd) -> Result<String, String> {
pub fn execute(_cmd: AccountCmd) -> Result<String, String> {
Err("Account management is deprecated. Please see #9997 for alternatives:\nhttps://github.com/paritytech/parity-ethereum/issues/9997".into())
}

View File

@@ -30,12 +30,12 @@ mod accounts {
pub struct AccountProvider;
impl ::ethcore::miner::LocalAccounts for AccountProvider {
fn is_local(&self, address: &Address) -> bool {
fn is_local(&self, _address: &Address) -> bool {
false
}
}
pub fn prepare_account_provider(_spec: &SpecType, _dirs: &Directories, _data_dir: &str, cfg: AccountsConfig, _passwords: &[Password]) -> Result<AccountProvider, String> {
pub fn prepare_account_provider(_spec: &SpecType, _dirs: &Directories, _data_dir: &str, _cfg: AccountsConfig, _passwords: &[Password]) -> Result<AccountProvider, String> {
warn!("Note: Your instance of Parity Ethereum is running without account support. Some CLI options are ignored.");
Ok(AccountProvider)
}

View File

@@ -139,6 +139,7 @@ fn file_exists(path: &Path) -> bool {
}
}
#[cfg(any(test, feature = "accounts"))]
pub fn upgrade_key_location(from: &PathBuf, to: &PathBuf) {
match fs::create_dir_all(&to).and_then(|()| fs::read_dir(from)) {
Ok(entries) => {