Replace remaining instances of use of debug feature with debug_assertions.

Also fix some code that did not build in debug mode anymore (d'oh!) in
`src/ion/merges.rs`, as exposed by this change.
This commit is contained in:
Chris Fallin
2021-08-12 17:35:55 -07:00
parent 8ed83e3a57
commit 69ad31f013
2 changed files with 5 additions and 5 deletions

View File

@@ -78,11 +78,11 @@ impl<T: Clone + Copy + Default> ParallelMoves<T> {
// Sort moves by destination and check that each destination
// has only one writer.
self.parallel_moves.sort_by_key(|&(_, dst, _)| dst);
if cfg!(debug) {
if cfg!(debug_assertions) {
let mut last_dst = None;
for &(_, dst, _) in &self.parallel_moves {
if last_dst.is_some() {
assert!(last_dst.unwrap() != dst);
debug_assert!(last_dst.unwrap() != dst);
}
last_dst = Some(dst);
}