Address Clippy complaints.

This commit is contained in:
Kris Nuttycombe 2024-12-20 11:02:05 -07:00
parent 900d8e8381
commit 977a310e93
3 changed files with 5 additions and 7 deletions

View File

@ -8,10 +8,11 @@ use group::GroupEncoding;
use sapling::{note_encryption::SaplingDomain, SaplingVerificationContext}; use sapling::{note_encryption::SaplingDomain, SaplingVerificationContext};
use secp256k1::{Secp256k1, VerifyOnly}; use secp256k1::{Secp256k1, VerifyOnly};
#[allow(deprecated)]
use ::transparent::keys::pubkey_to_address;
use ::transparent::{ use ::transparent::{
address::{Script, TransparentAddress}, address::{Script, TransparentAddress},
bundle as transparent, bundle as transparent,
keys::pubkey_to_address,
sighash::{SighashType, TransparentAuthorizingContext}, sighash::{SighashType, TransparentAuthorizingContext},
}; };
use orchard::note_encryption::OrchardDomain; use orchard::note_encryption::OrchardDomain;

View File

@ -254,11 +254,8 @@ impl<'b, C> minicbor::Decode<'b, C> for ZcashPczt {
cbor_map(d, &mut result, |key, obj, d| { cbor_map(d, &mut result, |key, obj, d| {
let key = let key =
u8::try_from(key).map_err(|e| minicbor::decode::Error::message(e.to_string()))?; u8::try_from(key).map_err(|e| minicbor::decode::Error::message(e.to_string()))?;
match key { if key == DATA {
DATA => { obj.data = d.bytes()?.to_vec();
obj.data = d.bytes()?.to_vec();
}
_ => {}
} }
Ok(()) Ok(())
})?; })?;

View File

@ -246,7 +246,7 @@ impl App {
// Determine the density of blocks we will be rendering. Use ceiling division // Determine the density of blocks we will be rendering. Use ceiling division
// to ensure we don't require more cells than we have (which would cause the // to ensure we don't require more cells than we have (which would cause the
// blocks around the chain tip to never be rendered). // blocks around the chain tip to never be rendered).
let area = u32::from(defrag_area.area()); let area = defrag_area.area();
let blocks_per_cell = (block_count + area - 1) / area; let blocks_per_cell = (block_count + area - 1) / area;
let blocks_per_row = blocks_per_cell * u32::from(defrag_area.width); let blocks_per_row = blocks_per_cell * u32::from(defrag_area.width);