Fix release build compilation error#7329
Conversation
| // Check transactions against filter, remove from container if it fails. | ||
| chunked_pops(container, &mut self.prio_graph, &mut window_budget); | ||
|
|
||
| #[cfg(debug_assertions)] |
There was a problem hiding this comment.
That's what I assumed too, but the build error and docs say otherwise. From Rust docs, "The result of expanding debug_assert! is always type checked."
There was a problem hiding this comment.
Isn't this implied by debug_assert???
...
That's what I assumed too
git blame led me here and same, would not have expected to have to add the extra markup:
https://doc.rust-lang.org/src/core/macros/mod.rs.html#306-312
To clarify, no actions being requested by me, I'm just sharing in your surprise a month late 😆
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7329 +/- ##
=======================================
Coverage 83.0% 83.0%
=======================================
Files 801 801
Lines 362242 362244 +2
=======================================
+ Hits 300789 300802 +13
+ Misses 61453 61442 -11 🚀 New features to boost your workflow:
|
apfitzge
left a comment
There was a problem hiding this comment.
fine workaround for an annoying aspect of rust's debug_assert.
Problem
"./cargo build --release" fails with compilation error over a cfg guard added in this PR.
Summary of Changes
Add cfg guard to the method invokations because the compiler doesn't ignore/skip checks inside debug_assert!() on release build. Alternatively, I can remove the cfg guard on the method definition.