fix clippy warnings

This commit is contained in:
Jack May 2018-09-23 14:38:17 -07:00 committed by Greg Fitzgerald
parent 3199f174a3
commit 1a45587c08
5 changed files with 8 additions and 7 deletions

View File

@ -215,6 +215,7 @@ impl Fullnode {
/// `--------` | | `------------`
/// `-------------------------------`
/// ```
#[cfg_attr(feature = "cargo-clippy", allow(too_many_arguments))]
pub fn new_with_bank(
keypair: Keypair,
bank: Bank,

View File

@ -84,7 +84,7 @@ pub fn verify(initial: Hash, entries: &[PohEntry]) -> bool {
last_hash = id;
}
return true;
true
}
#[cfg(test)]

View File

@ -66,13 +66,13 @@ impl SigVerifyStage {
let verified_batch = Self::verify_batch(batch, sigverify_disabled);
match sendr
if sendr
.lock()
.expect("lock in fn verify_batch in tpu")
.send(verified_batch)
.is_err()
{
Err(_) => return Err(Error::SendError),
_ => (),
return Err(Error::SendError);
}
let total_time_ms = timing::duration_as_ms(&now.elapsed());

View File

@ -81,7 +81,7 @@ impl Transaction {
) -> Self {
let payment = Payment {
tokens: tokens - fee,
to: to,
to,
};
let budget = Budget::Pay(payment);
let instruction = Instruction::NewContract(Contract { budget, tokens });

View File

@ -235,7 +235,7 @@ pub fn process_command(config: &WalletConfig) -> Result<String, Box<error::Error
}
let signature_str = signature.as_str().unwrap();
Ok(format!("{}", signature_str))
Ok(signature_str.to_string())
}
}
}
@ -311,7 +311,7 @@ pub enum WalletRpcRequest {
impl WalletRpcRequest {
fn make_rpc_request(
&self,
rpc_addr: &String,
rpc_addr: &str,
id: u64,
params: Option<Value>,
) -> Result<Value, Box<error::Error>> {