Skip to content

Commit

Permalink
Add UnauthorizedBundleWithMetadata type alias to get rid of clippy wa…
Browse files Browse the repository at this point in the history
…rning
  • Loading branch information
Dmitry Demin committed Jul 5, 2024
1 parent 752feb1 commit f45db57
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,9 @@ impl BundleMetadata {
}
}

/// A tuple containing an in-progress bundle with no proofs or signatures, and its associated metadata.
pub type UnauthorizedBundleWithMetadata<V, FL> = (UnauthorizedBundle<V, FL>, BundleMetadata);

/// A builder that constructs a [`Bundle`] from a set of notes to be spent, and outputs
/// to receive funds.
#[derive(Debug)]
Expand Down Expand Up @@ -638,7 +641,7 @@ impl Builder {
pub fn build<V: TryFrom<i64>, FL: OrchardFlavor>(
self,
rng: impl RngCore,
) -> Result<Option<(UnauthorizedBundle<V, FL>, BundleMetadata)>, BuildError> {
) -> Result<Option<UnauthorizedBundleWithMetadata<V, FL>>, BuildError> {
bundle(
rng,
self.anchor,
Expand Down Expand Up @@ -724,7 +727,7 @@ pub fn bundle<V: TryFrom<i64>, FL: OrchardFlavor>(
outputs: Vec<OutputInfo>,
// FIXME: Should we use NoteValue instead of ValueSum here as well?
burn: HashMap<AssetBase, ValueSum>,
) -> Result<Option<(UnauthorizedBundle<V, FL>, BundleMetadata)>, BuildError> {
) -> Result<Option<UnauthorizedBundleWithMetadata<V, FL>>, BuildError> {
let flags = bundle_type.flags();

let num_requested_spends = spends.len();
Expand Down

0 comments on commit f45db57

Please sign in to comment.