Repository navigation
chore: update Bytes visibility to correctly reflect the actual visibility - #10115
Merged
Merged
Conversation
visibility although `Bytes` and some of its functions are marked as `pub` it is never exposed outside the crate. updated this so reading the code will be less confusing
rluvaton
commented
Jun 11, 2026
Comment on lines
-97
to
-99
| pub fn is_empty(&self) -> bool { | ||
| self.len == 0 | ||
| } |
Member
Author
There was a problem hiding this comment.
unused and when changed to pub(crate) lint failed
etseidl
approved these changes
Jun 11, 2026
etseidl
left a comment
Contributor
There was a problem hiding this comment.
Seems rational, thanks. I feel the pain of trying to figure out which APIs are actually public.
Member
Author
|
Can you please merge :) |
Contributor
I'll merge tomorrow if no one objects by then. I don't venture into this part of the code base much. cc @alamb @Dandandan |
alamb
approved these changes
Jun 11, 2026
| /// custom deallocator to deallocate the region when it is no longer needed. | ||
| /// | ||
| pub struct Bytes { | ||
| pub(crate) struct Bytes { |
Contributor
There was a problem hiding this comment.
I double checked this is not actually a public struct https://docs.rs/arrow/latest/arrow/?search=Bytes
This was referenced Oct 21, 2026
Jefffrey
added a commit
that referenced
this pull request
Oct 22, 2026
…:shrink_to_fit when MemoryReservation::resize panics (#11786) - Backport #10932 - For inclusion in #11666 Cherry-pick of 9a8400e Conflicts resolved by hand: - `arrow-buffer/src/buffer/immutable.rs`: kept the nested `if let` form instead of let-chains (57's MSRV is 1.85); dropped two unrelated `into_mutable` tests that the conflict region pulled in from main, keeping only the new `test_shrink_to_fit_panicking_reservation` - `arrow-buffer/src/bytes.rs`: `Bytes::try_realloc` is still `pub` on this branch (it was changed to `pub(crate)` on main by #10115); kept it `pub`. `Bytes` lives in a private module so this is not a public API change. Co-authored-by: RIchard Baah <[email protected]> Co-authored-by: Jeffrey Vo <[email protected]>
Jefffrey
added a commit
that referenced
this pull request
Oct 22, 2026
…:shrink_to_fit when MemoryReservation::resize panics (#11785) - Backport #10932 - For inclusion in #11665 Cherry-pick of 9a8400e Conflicts resolved by hand: - `arrow-buffer/src/buffer/immutable.rs`: kept the nested `if let` form instead of let-chains (58's MSRV is 1.85) - `arrow-buffer/src/bytes.rs`: `Bytes::try_realloc` is still `pub` on this branch (it was changed to `pub(crate)` on main by #10115); kept it `pub`. `Bytes` lives in a private module so this is not a public API change. Co-authored-by: RIchard Baah <[email protected]> Co-authored-by: Jeffrey Vo <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
N/A
Rationale for this change
although
Bytesand some of its functions are marked aspubit is never exposed outside the crate.updated this so reading the code will be less confusing
What changes are included in this PR?
changed
pubtopub(crate)inBytesimplAre these changes tested?
existing tests
Are there any user-facing changes?
no since it was never exposed anyway