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

Public API using private types: Buffer::from_bytes takes unexported Bytes #6754

Open
tv42 opened this issue Nov 19, 2024 · 1 comment
Open
Labels

Comments

@tv42
Copy link

tv42 commented Nov 19, 2024

Describe the bug

https://docs.rs/arrow-buffer/53.2.0/arrow_buffer/buffer/struct.Buffer.html#method.from_bytes

/// Auxiliary method to create a new Buffer
pub fn from_bytes(bytes: Bytes) -> Self

This method is in the public API, but cannot be called.

Expected behavior

  1. All types used by public API are public.

Any outside users looking at this are probably better served by Buffer::from_vec.

@tv42 tv42 added the bug label Nov 19, 2024
@tustvold
Copy link
Contributor

tustvold commented Nov 19, 2024

We should probably make from_bytes crate private, agreed

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

No branches or pull requests

2 participants