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 mutable reference in cache database trait in Rust #2015

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

filipmacek
Copy link
Member

@filipmacek filipmacek commented Oct 18, 2024

Pull Request

  • in the trait CacheDatabaseAdapter, we have relaxed the signature of some functions to use immutable references. This change is possible because the load_* functions are read-only, and the add_* functions just are send data into the channel, so nothing is mutated from this function
  • the exceptions are load_currencies and load_positions because the con.keys function from Redis requires a mutable reference.

@filipmacek filipmacek added the rust Relating to the Rust core label Oct 18, 2024
@filipmacek filipmacek requested a review from cjdsellers October 18, 2024 12:15
@filipmacek filipmacek self-assigned this Oct 18, 2024
Copy link
Member

@cjdsellers cjdsellers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

@cjdsellers cjdsellers merged commit 27f461d into develop Oct 18, 2024
10 checks passed
@cjdsellers cjdsellers deleted the refine-cache-database-trait-rust branch October 18, 2024 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Relating to the Rust core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants