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

feat(common): Update::RemoveChunk emits VectorDiff::Remove #4696

Merged

Conversation

Hywan
Copy link
Member

@Hywan Hywan commented Feb 19, 2025

This patch updates Update::RemoveChunk to emit VectorDiff::Remove. Until now, RemoveChunk was expecting the chunk to be empty, because it is how it is used so far. However, with #4694, it can change rapidly. It's better to be robust whatever the future will look like.


This patch updates `Update::RemoveChunk` to emit `VectorDiff::Remove`.
Until now, `RemoveChunk` was expecting the chunk to be
empty, because it is how it is used so far. However, with
matrix-org#4694, it can change
rapidly.
Copy link

codecov bot commented Feb 19, 2025

Codecov Report

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

Project coverage is 85.88%. Comparing base (5c57631) to head (6a24d68).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...es/matrix-sdk-common/src/linked_chunk/as_vector.rs 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4696      +/-   ##
==========================================
- Coverage   85.90%   85.88%   -0.02%     
==========================================
  Files         292      292              
  Lines       33909    33910       +1     
==========================================
- Hits        29129    29125       -4     
- Misses       4780     4785       +5     

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

…Diff::Remove`.

This patch adds a test ensuring that `AsVector` generates the correct
`VectorDiff::Remove` when a non-empty chunk is removed.
@Hywan Hywan force-pushed the feat-common-linked-chunk-as-vector-remove-chunk branch from 22980b2 to 6a24d68 Compare February 20, 2025 09:24
@Hywan Hywan marked this pull request as ready for review February 20, 2025 09:30
@Hywan Hywan requested a review from a team as a code owner February 20, 2025 09:30
@Hywan Hywan requested review from jmartinesp and removed request for a team February 20, 2025 09:30
@Hywan Hywan merged commit 23f72ba into matrix-org:main Feb 20, 2025
75 of 80 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