Fix clippy complaints.
This commit is contained in:
parent
903922c59a
commit
bbe6280bb0
|
@ -191,6 +191,7 @@ pub(crate) fn add_block_to_runner<P, S, T>(
|
|||
}
|
||||
|
||||
#[tracing::instrument(skip_all, fields(height = block.height))]
|
||||
#[allow(clippy::suspicious_else_formatting)]
|
||||
pub(crate) fn scan_block_with_runner<
|
||||
P: consensus::Parameters + Send + 'static,
|
||||
K: ScanningKey,
|
||||
|
|
|
@ -32,7 +32,7 @@ fn main() {
|
|||
node.write(&mut buf).expect("Failed to write data");
|
||||
}
|
||||
|
||||
let mut file = std::fs::File::create(&out_file_path).expect("Failed to create output file");
|
||||
let mut file = std::fs::File::create(out_file_path).expect("Failed to create output file");
|
||||
|
||||
file.write_all(&buf[..])
|
||||
.expect("Failed to write data to file");
|
||||
|
|
|
@ -248,7 +248,7 @@ mod tests {
|
|||
|
||||
quickcheck! {
|
||||
fn serialization_round_trip(node_data: NodeData) -> TestResult {
|
||||
TestResult::from_bool(NodeData::from_bytes(0, &node_data.to_bytes()).unwrap() == node_data)
|
||||
TestResult::from_bool(NodeData::from_bytes(0, node_data.to_bytes()).unwrap() == node_data)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -294,7 +294,7 @@ impl Bundle<Unauthorized> {
|
|||
|
||||
// Signature has to have "SIGHASH_ALL" appended to it
|
||||
let mut sig_bytes: Vec<u8> = sig.serialize_der()[..].to_vec();
|
||||
sig_bytes.extend([SIGHASH_ALL as u8]);
|
||||
sig_bytes.extend([SIGHASH_ALL]);
|
||||
|
||||
// P2PKH scriptSig
|
||||
Script::default() << &sig_bytes[..] << &info.pubkey[..]
|
||||
|
|
|
@ -363,9 +363,8 @@ pub fn parse_parameters<R: io::Read>(
|
|||
// We only deserialize the verifying key for the Sprout parameters, which
|
||||
// appears at the beginning of the parameter file. The rest is loaded
|
||||
// during proving time.
|
||||
let sprout_vk = sprout_fs.as_mut().map(|mut fs| {
|
||||
VerifyingKey::<Bls12>::read(&mut fs)
|
||||
.expect("couldn't deserialize Sprout Groth16 verifying key")
|
||||
let sprout_vk = sprout_fs.as_mut().map(|fs| {
|
||||
VerifyingKey::<Bls12>::read(fs).expect("couldn't deserialize Sprout Groth16 verifying key")
|
||||
});
|
||||
|
||||
// There is extra stuff (the transcript) at the end of the parameter file which is
|
||||
|
|
Loading…
Reference in New Issue