Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify Memory::get return type to Option #852

Merged
merged 8 commits into from
Feb 23, 2023
Merged

Conversation

fmoletta
Copy link
Member

@fmoletta fmoletta commented Feb 17, 2023

Change Memory::get & Memory::get_maybe to return an Option instead of Result<Option
Change MaybeReloctable::get_int_ref & MaybeReloctable::get_relocatable to return Option instead of Result (previous error had incorrect info)
Fix errors used by the range_check builtin (add info & change name) + remove use of these errors outside of range_check methods
Add error UnknownMemoryCell
Refactor a hint to use get_integer_range instead of using get_range and the checking for None or non-integer valuesl

@codecov
Copy link

codecov bot commented Feb 17, 2023

Codecov Report

Merging #852 (219791c) into main (abaf215) will decrease coverage by 0.01%.
The diff coverage is 97.32%.

@@            Coverage Diff             @@
##             main     #852      +/-   ##
==========================================
- Coverage   96.82%   96.82%   -0.01%     
==========================================
  Files          69       69              
  Lines       28835    28804      -31     
==========================================
- Hits        27920    27889      -31     
  Misses        915      915              
Impacted Files Coverage Δ
...int_processor/builtin_hint_processor_definition.rs 98.67% <ø> (ø)
...rocessor/builtin_hint_processor/dict_hint_utils.rs 99.22% <ø> (ø)
src/hint_processor/builtin_hint_processor/set.rs 99.18% <ø> (-0.01%) ⬇️
src/utils.rs 99.48% <ø> (ø)
src/hint_processor/hint_processor_utils.rs 88.46% <75.00%> (-0.05%) ⬇️
src/vm/vm_core.rs 97.37% <92.30%> (-0.03%) ⬇️
src/vm/vm_memory/memory.rs 98.99% <95.00%> (-0.02%) ⬇️
src/vm/runners/cairo_runner.rs 97.53% <98.43%> (-0.01%) ⬇️
..._processor/builtin_hint_processor/blake2s_utils.rs 99.49% <100.00%> (+<0.01%) ⬆️
...t_processor/builtin_hint_processor/keccak_utils.rs 100.00% <100.00%> (ø)
... and 15 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

…able values (#853)

* Print relocatables & missing members in write_output

* Add test
Copy link
Member

@juanbono juanbono left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fmoletta fmoletta added this pull request to the merge queue Feb 23, 2023
Merged via the queue into main with commit 763fc5f Feb 23, 2023
@fmoletta fmoletta deleted the memory-get-option branch February 23, 2023 13:14
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.

None yet

3 participants