Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove mut in Rust sdk submit_tx #787

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

pymongo
Copy link
Contributor

@pymongo pymongo commented Jul 11, 2024

Description

I want to use Arc share/clone Rust SDK EconiaClient, but submit_tx of EconiaClient is mutable can't used inside Arc by ref.

I notice that submit_tx mut sequence_number of account, but it is a Atomic do not require mut ref to modified it, So submit_tx do not need mutable and safely used inside Arc

Testing

cargo build

Checklist

  • Did you update relevant documentation?
  • Did you add tests to cover new code or a fixed issue?
  • Did you update the changelog?
  • Did you check off all checkboxes from the linked Linear task? (Ignore if
    you are not a member of Econia Labs)

If a task does not apply to your PR, strike it through and mark it complete:

This change is compatible with previous usage of submit_tx no need to write changelog

- [x] ~Did you update the changelog?~

@alnoki alnoki requested a review from CRBl69 July 22, 2024 18:11
@alnoki alnoki requested review from CRBl69 and removed request for CRBl69 August 1, 2024 14:55
@CRBl69 CRBl69 merged commit 7ce7e6a into econia-labs:main Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants