style(zcash): rustfmt the checked-PCZT additions
What changed, and why it matters
This commit only reformats existing Rust code to match the project's style rules (rustfmt). No behavior, logic, or security properties of the Zcash PCZT handling changed.
No security action needed; this is a cosmetic style-only change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff is a pure formatting patch: line breaks were adjusted in test assertions and in return statements so that chained method calls fit rustfmt’s default layout. The same function calls, error variants, and control flow remain identical. There is no functional or security-relevant change.
Changed components
rust/apps/zcash/src/lib.rsrust/rust_c/src/zcash/mod.rsInspect captured patch +6 / −7
diff --git a/rust/apps/zcash/src/lib.rs b/rust/apps/zcash/src/lib.rs
index 71ded25..2af8eec 100644
--- a/rust/apps/zcash/src/lib.rs
+++ b/rust/apps/zcash/src/lib.rs
@@ -381,7 +381,9 @@ mod legacy_tests {
0,
)
.expect("selected account PCZT should preflight");
- assert!(parse_pczt_multi_coins(&MainNetwork, &normalized, &sample.seed_fingerprint).is_ok());
+ assert!(
+ parse_pczt_multi_coins(&MainNetwork, &normalized, &sample.seed_fingerprint).is_ok()
+ );
let account_one_pczt =
pczt::legacy_test_support::legacy_transparent_pczt_with_input_derivation(
diff --git a/rust/rust_c/src/zcash/mod.rs b/rust/rust_c/src/zcash/mod.rs
index b1f5def..cefe9bd 100644
--- a/rust/rust_c/src/zcash/mod.rs
+++ b/rust/rust_c/src/zcash/mod.rs
@@ -381,8 +381,7 @@ pub unsafe extern "C" fn parse_zcash_batch_tx_cypherpunk(
let batch = match ZcashSignBatch::try_from(bytes.to_vec()) {
Ok(batch) => batch,
Err(e) => {
- return TransactionParseResult::from(RustCError::InvalidData(format!("{e:?}")))
- .c_ptr()
+ return TransactionParseResult::from(RustCError::InvalidData(format!("{e:?}"))).c_ptr()
}
};
let ufvk_text = unsafe { recover_c_char(ufvk) };
@@ -439,8 +438,7 @@ unsafe fn sign_zcash_batch_tx_cypherpunk_dynamic(
Ok(seed_fingerprint) => {
if &seed_fingerprint != expected_seed_fingerprint {
seed.zeroize();
- return UREncodeResult::from(RustCError::MasterFingerprintMismatch)
- .c_ptr();
+ return UREncodeResult::from(RustCError::MasterFingerprintMismatch).c_ptr();
}
let mut results = Vec::new();
@@ -479,8 +477,7 @@ unsafe fn sign_zcash_batch_tx_cypherpunk_dynamic(
);
match TryInto::<Vec<u8>>::try_into(result) {
Ok(bytes) => {
- let registry_type =
- ZcashSignResult::get_registry_type().get_type();
+ let registry_type = ZcashSignResult::get_registry_type().get_type();
if allow_multipart {
UREncodeResult::encode(
bytes,
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.