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

Publicly document MutableBinaryViewArray invariants #20534

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cramertj
Copy link

@cramertj cramertj commented Jan 2, 2025

These invariants are referenced from the safety documentation of several publicly-exposed methods. This information should therefore be public so that callers can ensure correct usage.

These invariants are referenced from the safety documentation of several publicly-exposed methods. This information should therefore be public so that callers can ensure correct usage.
Copy link

codecov bot commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.04%. Comparing base (1ebd039) to head (ce02a54).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20534      +/-   ##
==========================================
- Coverage   79.04%   79.04%   -0.01%     
==========================================
  Files        1563     1564       +1     
  Lines      220798   220612     -186     
  Branches     2502     2502              
==========================================
- Hits       174522   174372     -150     
+ Misses      45702    45666      -36     
  Partials      574      574              

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

// - Each view must point to a valid slice of a buffer
// - `total_buffer_len` must be equal to `completed_buffers.iter().map(Vec::len).sum()`
// - `total_bytes_len` must be equal to `views.iter().map(View::len).sum()`
/// # Safety invariants
Copy link
Member

Choose a reason for hiding this comment

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

Can we just call them Invariants?

Suggested change
/// # Safety invariants
/// # Invariants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants