diff --git a/crates/storage/db/src/implementation/mdbx/mod.rs b/crates/storage/db/src/implementation/mdbx/mod.rs index ea3439823518..d4e6d7caa9ce 100644 --- a/crates/storage/db/src/implementation/mdbx/mod.rs +++ b/crates/storage/db/src/implementation/mdbx/mod.rs @@ -32,8 +32,17 @@ const DEFAULT_MAX_READERS: u64 = 32_000; /// See [reth_libmdbx::EnvironmentBuilder::set_handle_slow_readers] for more information. const MAX_SAFE_READER_SPACE: usize = 10 * GIGABYTE; -static PROCESS_ID: Lazy = - Lazy::new(|| if cfg!(unix) { std::os::unix::process::parent_id() } else { std::process::id() }); +static PROCESS_ID: Lazy = Lazy::new(|| { + #[cfg(unix)] + { + std::os::unix::process::parent_id() + } + + #[cfg(not(unix))] + { + std::process::id() + } +}); /// Environment used when opening a MDBX environment. RO/RW. #[derive(Debug)]