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

chore: Remove the get_ of some Store's methods #3554

Merged
merged 5 commits into from
Jun 13, 2024

Conversation

Hywan
Copy link
Member

@Hywan Hywan commented Jun 13, 2024

This patch renames Store::get_rooms, ::get_rooms_filtered and ::get_room to respectively ::rooms, ::rooms_filtered and ::room. This get_ prefix isn't really Rust idiomatic.

This patch also fix Store::rooms_filtered to not call Store::room, thus not locking the entire rooms for every item, making it everything faster.


@Hywan Hywan requested a review from a team as a code owner June 13, 2024 14:30
@Hywan Hywan requested review from poljar and removed request for a team June 13, 2024 14:30
This patch renames `Store::get_rooms`, `::get_rooms_filtered` and
`::get_room` to respectively `::rooms`, `::rooms_filtered` and `::room`.
This `get_` prefix isn't really Rust idiomatic.
@Hywan Hywan force-pushed the chore-sdk-remove-get-prefix branch from 29f6e1d to 0ecb8a3 Compare June 13, 2024 14:40
Hywan added 2 commits June 13, 2024 16:44
Just like in matrix-org#3552,
this patch updates `Store::rooms_filtered` to not call `Store::room` so
that it doesn't lock `rooms` for each item, thus making it way faster.
Hywan added 2 commits June 13, 2024 16:51
This patch renames `Client::get_rooms`, `::get_rooms_filtered` and
`::get_room` to respectively `::rooms`, `::rooms_filtered` and `::room`.
This `get_` prefix isn't really Rust idiomatic.
Copy link

codecov bot commented Jun 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.82%. Comparing base (15ab776) to head (b21b8c4).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3554      +/-   ##
==========================================
- Coverage   83.82%   83.82%   -0.01%     
==========================================
  Files         253      253              
  Lines       25890    25887       -3     
==========================================
- Hits        21703    21700       -3     
  Misses       4187     4187              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Hywan Hywan merged commit 6ecefd6 into matrix-org:main Jun 13, 2024
38 checks passed
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