File tree Expand file tree Collapse file tree 4 files changed +11
-14
lines changed Expand file tree Collapse file tree 4 files changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -45,11 +45,10 @@ impl FaucetClient {
45
45
/// request and not wait until the token is received. Use
46
46
/// `request_and_wait` to wait for the token.
47
47
pub async fn request ( & self , address : Address ) -> Result < Option < String > > {
48
- Ok ( self
49
- . 0
48
+ self . 0
50
49
. request ( address)
51
50
. await
52
- . map_err ( BindingsSdkError :: custom) ? )
51
+ . map_err ( BindingsSdkError :: custom)
53
52
}
54
53
55
54
/// Request gas from the faucet and wait until the request is completed and
@@ -60,21 +59,19 @@ impl FaucetClient {
60
59
/// Note that the faucet is heavily rate-limited, so calling repeatedly the
61
60
/// faucet would likely result in a 429 code or 502 code.
62
61
pub async fn request_and_wait ( & self , address : Address ) -> Result < Option < FaucetReceipt > > {
63
- Ok ( self
64
- . 0
62
+ self . 0
65
63
. request_and_wait ( address)
66
64
. await
67
- . map_err ( BindingsSdkError :: custom) ? )
65
+ . map_err ( BindingsSdkError :: custom)
68
66
}
69
67
70
68
/// Check the faucet request status.
71
69
///
72
70
/// Possible statuses are defined in: [`BatchSendStatusType`]
73
71
pub async fn request_status ( & self , id : String ) -> Result < Option < BatchSendStatus > > {
74
- Ok ( self
75
- . 0
72
+ self . 0
76
73
. request_status ( id)
77
74
. await
78
- . map_err ( BindingsSdkError :: custom) ? )
75
+ . map_err ( BindingsSdkError :: custom)
79
76
}
80
77
}
Original file line number Diff line number Diff line change @@ -518,7 +518,7 @@ impl GraphQLClient {
518
518
signatures : & [ UserSignature ] ,
519
519
tx : & Transaction ,
520
520
) -> 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 ?)
522
522
}
523
523
524
524
// ===========================================================================
@@ -701,7 +701,7 @@ impl GraphQLClient {
701
701
tx : & Transaction ,
702
702
skip_checks : Option < bool > ,
703
703
) -> 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 ?)
705
705
}
706
706
707
707
/// Dry run a [`TransactionKind`] and return the transaction effects and dry
@@ -724,7 +724,7 @@ impl GraphQLClient {
724
724
. 0
725
725
. read ( )
726
726
. await
727
- . dry_run_tx_kind ( & tx_kind, skip_checks, tx_meta)
727
+ . dry_run_tx_kind ( tx_kind, skip_checks, tx_meta)
728
728
. await ?)
729
729
}
730
730
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ impl Coin {
45
45
u64:: from_le_bytes ( ( & contents[ ObjectId :: LENGTH ..] ) . try_into ( ) . unwrap ( ) ) ;
46
46
47
47
Ok ( Self {
48
- coin_type : coin_type. clone ( ) . into ( ) ,
48
+ coin_type : coin_type. clone ( ) ,
49
49
id,
50
50
balance,
51
51
} )
Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ macro_rules! def_is_as_opt {
242
242
) * }
243
243
} ;
244
244
( $( $variant: ident) ,* $( , ) ?) => {
245
- crate :: def_is_as_opt!{ $( $variant => $variant, ) * }
245
+ $ crate:: def_is_as_opt!{ $( $variant => $variant, ) * }
246
246
} ;
247
247
}
248
248
You can’t perform that action at this time.
0 commit comments