Skip to content

chore: fix README usage example - #29

Open
iAmMichaelConnor wants to merge 1 commit into
mike/05-fix-empty-arraysfrom
mike/06-docs-readme-usage
Open

iAmMichaelConnor wants to merge 1 commit into
mike/05-fix-empty-arraysfrom
mike/06-docs-readme-usage

Conversation

@iAmMichaelConnor

@iAmMichaelConnor iAmMichaelConnor commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Stack

PR Change Builds on
1 of 4: #26 fix: read boundary sentinel values from the sorted keys master
2 of 4: #27 fix: constrain MutSparseArray lookup hints #26
3 of 4: #28 fix: support creating sparse arrays from empty inputs #27
➡ this PR 4 of 4: #29 chore: fix README usage example #28

Each PR is based on the one above it. Please review and merge in order from the top.

What

The README usage example did not compile: it used Field indices (the API takes u32), an
undefined nonzero_indices in the mutable example, array.ser, and was missing a semicolon.
Fix those, with otherwise the same example.

Testing

The example functions were compiled in a consumer crate against this branch with Noir 1.0.0;
the immutable example passes, and the mutable example's final set fails with
"MutSparseArray::set exceeded maximum size of array", as its comment says.

The example used Field indices (the API takes u32), an undefined
variable, a misspelled `set` and a missing semicolon.
@iAmMichaelConnor
iAmMichaelConnor force-pushed the mike/06-docs-readme-usage branch from 82a1241 to e024eee Compare November 11, 2026 13:16
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.

1 participant