fix clippy warnings
This commit is contained in:
parent
3199f174a3
commit
1a45587c08
|
@ -215,6 +215,7 @@ impl Fullnode {
|
|||
/// `--------` | | `------------`
|
||||
/// `-------------------------------`
|
||||
/// ```
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(too_many_arguments))]
|
||||
pub fn new_with_bank(
|
||||
keypair: Keypair,
|
||||
bank: Bank,
|
||||
|
|
|
@ -84,7 +84,7 @@ pub fn verify(initial: Hash, entries: &[PohEntry]) -> bool {
|
|||
last_hash = id;
|
||||
}
|
||||
|
||||
return true;
|
||||
true
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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 });
|
||||
|
|
|
@ -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>> {
|
||||
|
|
Loading…
Reference in New Issue