#![deny(unsafe_code, rust_2018_idioms)]
#![warn(
clippy::all,
clippy::pedantic,
clippy::nursery,
clippy::cargo,
clippy::panic,
clippy::unseparated_literal_suffix,
clippy::unwrap_used,
// clippy::expect_used, // TODO: revisit
clippy::unwrap_in_result,
)]
#![allow(
dead_code, // TODO: remove
clippy::cargo_common_metadata, // TODO: revisit
clippy::missing_const_for_fn,
clippy::missing_errors_doc,
clippy::missing_panics_doc,
clippy::module_name_repetitions,
clippy::unnecessary_wraps,
clippy::use_self,
clippy::unwrap_in_result, // TODO: revisit
clippy::multiple_crate_versions,
clippy::needless_pass_by_value,
clippy::implicit_hasher,
)]
#![cfg_attr(not(feature = "std"), no_std)]
pub mod error;
#[cfg(feature = "jemalloc-profiling")]
pub mod oompanic;
pub mod profiling;
#[cfg(all(feature = "set-jemalloc-global", feature = "oompanic-allocator"))]
#[global_allocator]
static ALLOC: crate::oompanic::Allocator<tikv_jemallocator::Jemalloc> =
crate::oompanic::Allocator(tikv_jemallocator::Jemalloc);
#[cfg(all(feature = "set-jemalloc-global", not(feature = "oompanic-allocator")))]
#[global_allocator]
static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;