Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

protection from adding empty traces && assertion in traces db #1994

Merged
merged 2 commits into from
Aug 24, 2016

Conversation

debris
Copy link
Collaborator

@debris debris commented Aug 24, 2016

it may help diagnose #1971

@debris debris added the A0-pleasereview 🤓 Pull request needs code review. label Aug 24, 2016
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 21ea121 on trace_db_assert into * on master*.

// invalid: retracted 1, enacted 0 => true, false,
let ret = request.retracted != 0;
let ena = !request.enacted.is_empty();
assert!((!ret && ena) || (ret == ena));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldn't assert!(!(ret && !ena)); work and be more in-line to what is written in comment?
(if I understand correctly there is only one invalid case - ret == true && ena == false - so negation will cover all valid cases)

I'm I missing something?

@tomusdrw tomusdrw added A6-mustntgrumble 💦 Pull request has areas for improvement. The author need not address them before merging. and removed A0-pleasereview 🤓 Pull request needs code review. labels Aug 24, 2016
@debris debris added A0-pleasereview 🤓 Pull request needs code review. and removed A6-mustntgrumble 💦 Pull request has areas for improvement. The author need not address them before merging. labels Aug 24, 2016
@gavofyork gavofyork added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Aug 24, 2016
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling d7d9b23 on trace_db_assert into * on master*.

@gavofyork gavofyork merged commit f6b8dd0 into master Aug 24, 2016
@gavofyork gavofyork deleted the trace_db_assert branch August 24, 2016 16:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants