Address review feedback

This commit is contained in:
Amanieu d'Antras
2022-01-11 22:27:15 +00:00
parent be61078e4e
commit 6b1a5e8b1b
3 changed files with 10 additions and 3 deletions

View File

@@ -28,5 +28,12 @@ overflow-checks = true
[features]
default = []
# Enables generation of DefAlloc edits for the checker.
checker = []
fuzzing = ["arbitrary", "checker"]
# Enables detailed logging which can be somewhat expensive.
trace-log = []
# Exposes the internal API for fuzzing.
fuzzing = ["arbitrary", "checker", "trace-log"]

View File

@@ -604,7 +604,7 @@ pub struct Stats {
// the most significant field to the least significant one.
//
// These work best when the fields are stored in reverse order in memory so that
// they can be loaded with a single u64 load.
// they can be loaded with a single u64 load on little-endian machines.
#[inline(always)]
pub fn u64_key(b: u32, a: u32) -> u64 {
a as u64 | (b as u64) << 32

View File

@@ -16,7 +16,7 @@
// performance cost so we disable it in release builds.
macro_rules! trace {
($($tt:tt)*) => {
if cfg!(debug_assertions) {
if cfg!(feature = "trace-log") {
::log::trace!($($tt)*);
}
};