Skip to content

Commit

Permalink
Fix & allow clippy errors
Browse files Browse the repository at this point in the history
* Fix clippy error writing `&Vec` instead of `&[_]` involves a new object where a slice will do
* allow error clippy::too_many_arguments
  • Loading branch information
chrisgitiota committed Jan 7, 2025
1 parent c1e4cbf commit f46876f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl ManagedWasmIotaClient {
pub async fn execute_transaction_block(
&self,
tx_data_bcs: &TransactionDataBcs,
signatures: &Vec<SignatureBcs>,
signatures: &[SignatureBcs],
options: Option<IotaTransactionBlockResponseOptions>,
request_type: Option<ExecuteTransactionRequestType>,
) -> IotaRpcResult<IotaTransactionBlockResponseAdapter> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ impl QuorumDriverTrait for QuorumDriverAdapter {
async fn execute_transaction_block(
&self,
tx_data_bcs: &TransactionDataBcs,
signatures: &Vec<SignatureBcs>,
signatures: &[SignatureBcs],
options: Option<IotaTransactionBlockResponseOptions>,
request_type: Option<ExecuteTransactionRequestType>,
) -> IotaRpcResult<IotaTransactionBlockResponseAdaptedTraitObj> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl<'a> QuorumDriverTrait for QuorumDriverAdapter<'a> {
async fn execute_transaction_block(
&self,
tx_data_bcs: &TransactionDataBcs,
signatures: &Vec<SignatureBcs>,
signatures: &[SignatureBcs],
options: Option<IotaTransactionBlockResponseOptions>,
request_type: Option<ExecuteTransactionRequestType>,
) -> IotaRpcResult<IotaTransactionBlockResponseAdaptedTraitObj> {
Expand Down
2 changes: 1 addition & 1 deletion identity_iota_interaction/src/iota_client_trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pub trait QuorumDriverTrait {
async fn execute_transaction_block(
&self,
tx_data_bcs: &TransactionDataBcs,
signatures: &Vec<SignatureBcs>,
signatures: &[SignatureBcs],
options: Option<IotaTransactionBlockResponseOptions>,
request_type: Option<ExecuteTransactionRequestType>,
) -> IotaRpcResult<Box<dyn IotaTransactionBlockResponseT<Error = Self::Error, NativeResponse=Self::NativeResponse>>>;
Expand Down
5 changes: 5 additions & 0 deletions identity_iota_interaction/src/move_call_traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ pub trait IdentityMoveCalls {
package: ObjectID,
) -> Result<ProgrammableTransactionBcs, Self::Error>;

// We allow clippy::too_many_arguments here because splitting this trait function into multiple
// other functions or creating an options struct gathering multiple function arguments has lower
// priority at the moment.
// TODO: remove clippy::too_many_arguments allowance here
#[allow(clippy::too_many_arguments)]
fn propose_config_change<I1, I2>(
identity: OwnedObjectRef,
controller_cap: ObjectRef,
Expand Down
2 changes: 1 addition & 1 deletion identity_iota_interaction/src/sdk_types/generated_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub struct ExecuteTransactionBlockParams {
impl ExecuteTransactionBlockParams {
pub fn new(
tx_bytes: &TransactionDataBcs,
signatures: &Vec<SignatureBcs>,
signatures: &[SignatureBcs],
options: Option<IotaTransactionBlockResponseOptions>,
request_type: Option<ExecuteTransactionRequestType>,
) -> Self {
Expand Down

0 comments on commit f46876f

Please sign in to comment.