Skip to content

fix: Allow null pointers as empty slices#79

Merged
mwcampbell merged 1 commit intomainfrom
empty-slice-check
Feb 25, 2026
Merged

fix: Allow null pointers as empty slices#79
mwcampbell merged 1 commit intomainfrom
empty-slice-check

Conversation

@DataTriny
Copy link
Member

On functions that accept a sized slice, passing a null pointer when the size is 0 is an idiomatic C pattern. This PR makes sure we provide an empty vector to the Rust function/method in that case.

@mwcampbell mwcampbell merged commit a3a8348 into main Feb 25, 2026
18 checks passed
@mwcampbell mwcampbell deleted the empty-slice-check branch February 25, 2026 20:17
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