Skip to content

Commit 260748f

Browse files
committed
clippy
1 parent 63a624f commit 260748f

File tree

4 files changed

+11
-14
lines changed

4 files changed

+11
-14
lines changed

crates/iota-sdk-ffi/src/faucet.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,10 @@ impl FaucetClient {
4545
/// request and not wait until the token is received. Use
4646
/// `request_and_wait` to wait for the token.
4747
pub async fn request(&self, address: Address) -> Result<Option<String>> {
48-
Ok(self
49-
.0
48+
self.0
5049
.request(address)
5150
.await
52-
.map_err(BindingsSdkError::custom)?)
51+
.map_err(BindingsSdkError::custom)
5352
}
5453

5554
/// Request gas from the faucet and wait until the request is completed and
@@ -60,21 +59,19 @@ impl FaucetClient {
6059
/// Note that the faucet is heavily rate-limited, so calling repeatedly the
6160
/// faucet would likely result in a 429 code or 502 code.
6261
pub async fn request_and_wait(&self, address: Address) -> Result<Option<FaucetReceipt>> {
63-
Ok(self
64-
.0
62+
self.0
6563
.request_and_wait(address)
6664
.await
67-
.map_err(BindingsSdkError::custom)?)
65+
.map_err(BindingsSdkError::custom)
6866
}
6967

7068
/// Check the faucet request status.
7169
///
7270
/// Possible statuses are defined in: [`BatchSendStatusType`]
7371
pub async fn request_status(&self, id: String) -> Result<Option<BatchSendStatus>> {
74-
Ok(self
75-
.0
72+
self.0
7673
.request_status(id)
7774
.await
78-
.map_err(BindingsSdkError::custom)?)
75+
.map_err(BindingsSdkError::custom)
7976
}
8077
}

crates/iota-sdk-ffi/src/graphql.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ impl GraphQLClient {
518518
signatures: &[UserSignature],
519519
tx: &Transaction,
520520
) -> Result<Option<TransactionEffects>> {
521-
Ok(self.0.read().await.execute_tx(signatures, &tx).await?)
521+
Ok(self.0.read().await.execute_tx(signatures, tx).await?)
522522
}
523523

524524
// ===========================================================================
@@ -701,7 +701,7 @@ impl GraphQLClient {
701701
tx: &Transaction,
702702
skip_checks: Option<bool>,
703703
) -> Result<DryRunResult> {
704-
Ok(self.0.read().await.dry_run_tx(&tx, skip_checks).await?)
704+
Ok(self.0.read().await.dry_run_tx(tx, skip_checks).await?)
705705
}
706706

707707
/// Dry run a [`TransactionKind`] and return the transaction effects and dry
@@ -724,7 +724,7 @@ impl GraphQLClient {
724724
.0
725725
.read()
726726
.await
727-
.dry_run_tx_kind(&tx_kind, skip_checks, tx_meta)
727+
.dry_run_tx_kind(tx_kind, skip_checks, tx_meta)
728728
.await?)
729729
}
730730

crates/iota-sdk-types/src/framework.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ impl Coin {
4545
u64::from_le_bytes((&contents[ObjectId::LENGTH..]).try_into().unwrap());
4646

4747
Ok(Self {
48-
coin_type: coin_type.clone().into(),
48+
coin_type: coin_type.clone(),
4949
id,
5050
balance,
5151
})

crates/iota-sdk-types/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ macro_rules! def_is_as_opt {
242242
)*}
243243
};
244244
($($variant:ident),* $(,)?) => {
245-
crate::def_is_as_opt!{$($variant => $variant,)*}
245+
$crate::def_is_as_opt!{$($variant => $variant,)*}
246246
};
247247
}
248248

0 commit comments

Comments
 (0)