Skip to content

Commit

Permalink
Fix wallet-core clippy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Daksh14 committed Aug 29, 2024
1 parent 41e5ce9 commit c520a9e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions wallet-core/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use rand::{CryptoRng, RngCore};
/// Note and the .value of the note seperated by u64
pub type Inputs = Vec<(Note, u64)>;

#[allow(clippy::module_name_repetitions)]
#[derive(Debug, PartialEq)]
/// Error when calculating input notes for use in transaction
pub enum InputNotesError {
Expand All @@ -33,9 +34,13 @@ pub enum InputNotesError {
/// The resulting array is only 4 notes long, the argument of this function can
/// be arbitary amount of notes.
///
/// # Errors
///
/// If the target sum is greater than the sum of the notes then an error is
/// returned. If the notes vector is empty then an error is returned.
///
/// See `InputNotesError` type for possible errors
/// this function can yield.
#[must_use]
pub fn try_input_notes(
nodes: Inputs,
target_sum: u64,
Expand Down Expand Up @@ -152,13 +157,13 @@ pub fn gen_note<T: RngCore + CryptoRng>(
Note::obfuscated(
rng,
&sender_pk,
&owner_pk,
owner_pk,
value,
value_blinder,
sender_blinder,
)
} else {
Note::transparent(rng, &sender_pk, &owner_pk, value, sender_blinder)
Note::transparent(rng, &sender_pk, owner_pk, value, sender_blinder)
}
}

Expand Down

0 comments on commit c520a9e

Please sign in to comment.