Skip to content

fix: RoomEventCache::subscribe is now infallible #4660

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

Conversation

Hywan
Copy link
Member

@Hywan Hywan commented Feb 12, 2025

This patch updates RoomEventCache::subscribe to be infallible. This method wasn't able to return something else than an Ok. The return type has been updated from Result<T> to T.


@Hywan Hywan requested a review from bnjbvr February 12, 2025 14:46
@Hywan Hywan requested a review from a team as a code owner February 12, 2025 14:46
Copy link
Member

@bnjbvr bnjbvr left a comment

Choose a reason for hiding this comment

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

Super nice, thanks!

This patch updates `RoomEventCache::subscribe` to be infallible. This
method wasn't able to return something else than an `Ok`. The return
type has been updated from `Result<T>` to `T`.
@Hywan Hywan force-pushed the refactor-sdk-room-event-cache-subscribe-is-infallible branch from d07be2e to 41e6889 Compare February 12, 2025 15:18
Copy link

codecov bot commented Feb 12, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 5 lines in your changes missing coverage. Please review.

Project coverage is 85.71%. Comparing base (fce7999) to head (41e6889).
Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
crates/matrix-sdk-ui/src/timeline/builder.rs 58.33% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4660      +/-   ##
==========================================
+ Coverage   85.69%   85.71%   +0.01%     
==========================================
  Files         292      292              
  Lines       33620    33618       -2     
==========================================
+ Hits        28812    28817       +5     
+ Misses       4808     4801       -7     

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

@Hywan Hywan merged commit ed16e91 into matrix-org:main Feb 12, 2025
41 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