From b9cae9722029091fba62a71d67cd913db0d99e62 Mon Sep 17 00:00:00 2001 From: Daksh <41485688+Daksh14@users.noreply.github.com> Date: Mon, 9 Sep 2024 13:43:26 -0400 Subject: [PATCH] wallet-core: Fix clippy warnings --- rusk-wallet/src/wallet.rs | 4 +++- wallet-core/src/moonlight.rs | 14 +++++++++++++- wallet-core/src/phoenix.rs | 2 ++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/rusk-wallet/src/wallet.rs b/rusk-wallet/src/wallet.rs index 47f178c487..ae1cad2ff7 100644 --- a/rusk-wallet/src/wallet.rs +++ b/rusk-wallet/src/wallet.rs @@ -86,7 +86,9 @@ impl Wallet { /// Returns phoenix key pair for a given address /// /// # Errors - /// - + /// + /// - If the Address provided is not a Phoenix address + /// - If the address is not owned pub fn phoenix_keys( &self, addr: &Address, diff --git a/wallet-core/src/moonlight.rs b/wallet-core/src/moonlight.rs index 216f34faa0..f7e2e887b3 100644 --- a/wallet-core/src/moonlight.rs +++ b/wallet-core/src/moonlight.rs @@ -7,6 +7,8 @@ //! Implementations of basic wallet functionalities to create moonlight //! transactions. +#![allow(clippy::module_name_repetitions)] + use execution_core::{ signatures::bls::{PublicKey as BlsPublicKey, SecretKey as BlsSecretKey}, stake::{Stake, Withdraw as StakeWithdraw, STAKE_CONTRACT}, @@ -51,10 +53,15 @@ pub fn moonlight( .into()) } -/// Stake through moonlight, the stake_nonce is the nonce of the stake +/// Stake through moonlight, the `stake_nonce` is the nonce of the stake /// which is obtained via stake info query on the chain /// /// The `nonce` is the nonce of the moonlight transaction +/// +/// # Errors +/// +/// This function most likey not fail but if the `nonce` is incorrect +/// or the `stake_nonce` the node will error and not accept the transcation pub fn moonlight_stake( from_sk: &BlsSecretKey, stake_value: u64, @@ -88,6 +95,11 @@ pub fn moonlight_stake( } /// Unstake through moonlight +/// +/// # Errors +/// +/// This function most likey not fail but if the `nonce` is incorrect +/// or the `stake_nonce` the node will error and not accept the transcation pub fn moonlight_unstake( rng: &mut R, from_sk: &BlsSecretKey, diff --git a/wallet-core/src/phoenix.rs b/wallet-core/src/phoenix.rs index 70b6987e61..f72aaa3777 100644 --- a/wallet-core/src/phoenix.rs +++ b/wallet-core/src/phoenix.rs @@ -7,6 +7,8 @@ //! Implementations of basic wallet functionalities to create phoenix //! transactions. +#![allow(clippy::module_name_repetitions)] + use alloc::vec::Vec; use rand::{CryptoRng, RngCore};