From b7e95f549d521c8366044627931fd74c4288b252 Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Fri, 27 Feb 2026 10:23:16 -0700 Subject: [PATCH 1/2] Make pczt::Bundle::extract take `self` by reference. --- CHANGELOG.md | 4 ++++ src/pczt/tx_extractor.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16f8fbcf8..96126a262 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to Rust's notion of ## [Unreleased] +### Changed +- `orchard::pczt::Bundle::extract` now takes its `self` argument by + reference instead of by value. + ## [0.12.0] - 2025-12-05 ### Added diff --git a/src/pczt/tx_extractor.rs b/src/pczt/tx_extractor.rs index e80d60249..4c98a33f0 100644 --- a/src/pczt/tx_extractor.rs +++ b/src/pczt/tx_extractor.rs @@ -28,7 +28,7 @@ impl super::Bundle { /// /// [regular `Bundle`]: crate::Bundle pub fn extract>( - self, + &self, ) -> Result>, TxExtractorError> { self.to_tx_data( |action| { From 6b12c77260aa7fac0d804983fc31b71b584d48e0 Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Fri, 27 Feb 2026 14:58:21 -0700 Subject: [PATCH 2/2] Fix clippy lints. --- src/circuit.rs | 2 +- src/value.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/circuit.rs b/src/circuit.rs index 2003a84d5..06474cc9e 100644 --- a/src/circuit.rs +++ b/src/circuit.rs @@ -1115,7 +1115,7 @@ mod tests { let mut rng = OsRng; let (circuit, instance) = generate_circuit_instance(OsRng); - let instances = &[instance.clone()]; + let instances = core::slice::from_ref(&instance); let pk = ProvingKey::build(); let proof = Proof::create(&pk, &[circuit], instances, &mut rng).unwrap(); diff --git a/src/value.rs b/src/value.rs index 67ac8787f..053ad5838 100644 --- a/src/value.rs +++ b/src/value.rs @@ -6,8 +6,8 @@ //! - [`ValueSum`], the sum of note values within an Orchard [`Action`] or [`Bundle`]. //! It is a signed 64-bit integer (with range [`VALUE_SUM_RANGE`]). //! - `valueBalanceOrchard`, which is a signed 63-bit integer. This is represented -//! by a user-defined type parameter on [`Bundle`], returned by -//! [`Bundle::value_balance`] and [`Builder::value_balance`]. +//! by a user-defined type parameter on [`Bundle`], returned by +//! [`Bundle::value_balance`] and [`Builder::value_balance`]. //! //! If your specific instantiation of the Orchard protocol requires a smaller bound on //! valid note values (for example, Zcash's `MAX_MONEY` fits into a 51-bit integer), you