Replace pub field with AsRef impl

This commit is contained in:
Tyera Eulberg
2018-07-31 15:50:09 -06:00
committed by Grimes
parent fda3b9bbd4
commit 7ff721e563
6 changed files with 25 additions and 10 deletions

View File

@@ -8,7 +8,6 @@ extern crate serde_json;
extern crate solana;
use clap::{App, Arg, SubCommand};
use generic_array::GenericArray;
use solana::client::mk_client;
use solana::crdt::NodeInfo;
use solana::drone::DRONE_PORT;
@@ -182,7 +181,7 @@ fn parse_args() -> Result<WalletConfig, Box<error::Error>> {
display_actions();
Err(WalletError::BadParameter("Invalid public key".to_string()))?;
}
PublicKey(GenericArray::clone_from_slice(&pubkey_vec))
PublicKey::new(&pubkey_vec)
} else {
id.pubkey()
};