Skip to content

Commit

Permalink
Merge pull request #787 from pymongo/remove_unused_mut
Browse files Browse the repository at this point in the history
Remove mut in Rust sdk submit_tx
  • Loading branch information
CRBl69 authored Aug 8, 2024
2 parents 61a834b + 288cb0e commit 7ce7e6a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/rust/e2e/src/market_registration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub async fn test_market_registration<'a>(state: &'a State) -> Result<()> {
)
.unwrap();

let (_, mut econia_client) =
let (_, econia_client) =
account(&state.faucet_client, &state.node_url, state.econia_address).await;

econia_client.submit_tx(entry).await?;
Expand Down
2 changes: 1 addition & 1 deletion src/rust/sdk/example/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ async fn main() -> EconiaResult<()> {
faucet_address,
faucet_client,
econia_address,
mut econia_client,
econia_client,
} = init(&args).await;

print_title!("Create a market for eAPT/eUSDC");
Expand Down
4 changes: 2 additions & 2 deletions src/rust/sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ impl EconiaClient {
}

async fn submit_tx_internal(
&mut self,
&self,
payload: &EntryFunction,
) -> EconiaResult<EconiaTransaction> {
let addr = self.user_account.address();
Expand Down Expand Up @@ -382,7 +382,7 @@ impl EconiaClient {
/// # Arguments:
///
/// * `entry` - `EntryFunction` to be submitted as part of the transaction to the blockchain.
pub async fn submit_tx(&mut self, entry: EntryFunction) -> EconiaResult<EconiaTransaction> {
pub async fn submit_tx(&self, entry: EntryFunction) -> EconiaResult<EconiaTransaction> {
for i in 0..(self.config.retry_count) {
match self.submit_tx_internal(&entry).await {
Ok(lt) => return Ok(lt),
Expand Down

0 comments on commit 7ce7e6a

Please sign in to comment.