Skip to content

docs: propagate unwrap-to-? migration into tutorial snippets - #215

Open
memosr wants to merge 1 commit into
0xMiden:mainfrom
memosr:fix/propagate-error-handling-in-tutorial-snippets
Open

docs: propagate unwrap-to-? migration into tutorial snippets#215
memosr wants to merge 1 commit into
0xMiden:mainfrom
memosr:fix/propagate-error-handling-in-tutorial-snippets

Conversation

@memosr

@memosr memosr commented Aug 8, 2026

Copy link
Copy Markdown

rust-client/src/bin/ uses the ? operator on build_consume_notes, but
three tutorial snippets still call .unwrap(). The migration reached the
large no_run listings, which CI compiles, but not the smaller
rust ignore snippets, which are never compiled and so drifted silently.

Three call sites, each now matching its source exactly:

  • mint_consume_create_tutorial.md vs create_mint_consume_send.rs
  • custom_note_how_to.md vs hash_preimage_note.rs
  • unauthenticated_note_how_to.md vs unauthenticated_note_transfer.rs

The first one also resolves a contradiction inside its own file, which
already used ? in the final full listing further down.

Line wrapping differs between the three because the sources differ:
consume_request fits on one line, transaction_request does not. Each
snippet reproduces its own source rather than normalizing them.

Scope is limited to these three build_consume_notes call sites. No
repo-wide .unwrap() sweep was done, and other .unwrap() calls that
match their sources are untouched.

Docs-only change. cargo test --doc in docs/ passes (17 passed, 0 failed).
Ran prettier --write per CONTRIBUTING.md.

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