Skip to content

Remove Misleading BooleanBufferBuilder::reserve Doc #7236

@tv42

Description

@tv42

Describe the bug

https://docs.rs/arrow/latest/arrow/array/struct.BooleanBufferBuilder.html#method.reserve says

pub fn reserve(&mut self, additional: usize)
Reserve space to at least additional new bits. Capacity will be >= self.len() + additional. New bytes are uninitialized and reading them is undefined behavior.

Other reserve methods look similar, but don't document their undefined behavior; I haven't carefully read the code on whether they actually are unsafe or not.

It seems this is letting the caller trigger undefined behavior, but is not marked as unsafe.

Their documentation should probably also be unified.

Metadata

Metadata

Labels

documentationImprovements or additions to documentationenhancementAny new improvement worthy of a entry in the changeloggood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions