Merge pull request #732 from nuttycom/fix/clippy_lints

Fix clippy complaints.
This commit is contained in:
str4d 2022-12-10 02:21:54 +00:00 committed by GitHub
commit 51932b7366
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 6 deletions

View File

@ -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");

View 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)
}
}
}

View File

@ -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[..]

View File

@ -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