Skip to content

fix: replace unwrap() with ? in recursive calls#2790

Open
giwaov wants to merge 1 commit into0xMiden:nextfrom
giwaov:fix/unwrap-to-question-mark
Open

fix: replace unwrap() with ? in recursive calls#2790
giwaov wants to merge 1 commit into0xMiden:nextfrom
giwaov:fix/unwrap-to-question-mark

Conversation

@giwaov
Copy link

@giwaov giwaov commented Mar 6, 2026

Summary

Replace .unwrap()\ with ?\ in two locations for proper error propagation.

Changes

  • \decorator_storage.rs: Replace .unwrap()\ with ?\ in \�dd_decorator_info_for_node\ recursive call (line 403)
  • \debug_var_storage.rs: Replace .unwrap()\ with ?\ in \�dd_debug_var_info_for_node\ recursive call (line 335)

Both functions return \Result<(), DecoratorIndexError>\ and use ?\ throughout for error propagation, but these two recursive calls were the only places using .unwrap()\ instead of propagating errors to the caller.

Closes #2785

Replace .unwrap() with ? in two locations for proper error propagation:
- decorator_storage.rs: add_decorator_info_for_node recursive call
- debug_var_storage.rs: add_debug_var_info_for_node recursive call

Both functions return Result<(), DecoratorIndexError> and use ? throughout,
but these two recursive calls were the only places using .unwrap() instead
of propagating errors.

Closes 0xMiden#2785
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

Automated check (CONTRIBUTING.md)

Findings:

Recommendations:

  • Consider adding a Test plan or clear review steps.

Next steps:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unwrap() instead of ? in recursive calls in decorator_storage and debug_var_storage

1 participant