-
Notifications
You must be signed in to change notification settings - Fork 156
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
Add RunResources.get_n_steps method #1225
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1225 +/- ##
=======================================
Coverage 97.59% 97.59%
=======================================
Files 89 89
Lines 36163 36166 +3
=======================================
+ Hits 35293 35296 +3
Misses 870 870
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Benchmark Results for unmodified programs 🚀
|
src/vm/runners/cairo_runner.rs
Outdated
@@ -94,6 +94,10 @@ impl RunResources { | |||
pub fn consume_steps(&mut self) { | |||
self.n_steps -= 1; | |||
} | |||
|
|||
pub fn get_n_steps(&mut self) -> usize { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need a mutable reference here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, good catch!
copy paste staff
* Add RunResources.get_n_steps method * Update CHANGELOG.md * use no mut reference
Add RunResources.get_n_steps method
Description
Description of the pull request changes and motivation.
Checklist