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

Move is_bit_set into match body #339

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

ardikars
Copy link
Contributor

Move is_bit_set into match body.

@coveralls-official
Copy link

Pull Request Test Coverage Report for Build 5963865831

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 93.812%

Totals Coverage Status
Change from base Build 5953615517: 0.0%
Covered Lines: 5200
Relevant Lines: 5543

💛 - Coveralls

@@ -475,8 +475,7 @@ impl<'a, D: Dialect> RunProgramContext<'a, D> {
if cost > effective_max_cost {
return err(max_cost_ptr, "cost exceeded");
}
let top = self.op_stack.pop();
let op = match top {
let op = match self.op_stack.pop() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I suspect this whole loop should probably be turned into something like:

while let Some(op) = self.op_stack.pop() {
   ...
}

as long as we can ensure the cost check is still performed in the edge case of it exceeding on the last operator

Copy link

'This PR has been flagged as stale due to no activity for over 60
days. It will not be automatically closed, but it has been given
a stale-pr label and should be manually reviewed.'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants