remove unnecessary malloc imports, remove cargo.toml env check
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
9883444486
commit
593bad7780
|
@ -308,7 +308,6 @@ hyperlocal = { git = "https://github.com/softprops/hyperlocal", rev = "2ee4d1496
|
||||||
"server",
|
"server",
|
||||||
] } # unix socket support
|
] } # unix socket support
|
||||||
|
|
||||||
[target.'cfg(all(not(target_env = "msvc"), not(target_os = "macos"), target_os = "linux"))'.dependencies]
|
|
||||||
hardened_malloc-rs = { version = "0.1", optional = true, features = [
|
hardened_malloc-rs = { version = "0.1", optional = true, features = [
|
||||||
"static",
|
"static",
|
||||||
"clang",
|
"clang",
|
||||||
|
|
15
src/main.rs
15
src/main.rs
|
@ -24,8 +24,6 @@ use ruma::api::client::{
|
||||||
error::{Error as RumaError, ErrorBody, ErrorKind},
|
error::{Error as RumaError, ErrorBody, ErrorKind},
|
||||||
uiaa::UiaaResponse,
|
uiaa::UiaaResponse,
|
||||||
};
|
};
|
||||||
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc", not(feature = "hardened_malloc")))]
|
|
||||||
use tikv_jemallocator::Jemalloc;
|
|
||||||
use tokio::{
|
use tokio::{
|
||||||
signal,
|
signal,
|
||||||
sync::oneshot::{self, Sender},
|
sync::oneshot::{self, Sender},
|
||||||
|
@ -44,16 +42,7 @@ mod routes;
|
||||||
|
|
||||||
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc", not(feature = "hardened_malloc")))]
|
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc", not(feature = "hardened_malloc")))]
|
||||||
#[global_allocator]
|
#[global_allocator]
|
||||||
static GLOBAL: Jemalloc = Jemalloc;
|
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
|
||||||
|
|
||||||
#[cfg(all(
|
|
||||||
not(target_env = "msvc"),
|
|
||||||
not(target_os = "macos"),
|
|
||||||
not(feature = "jemalloc"),
|
|
||||||
feature = "hardened_malloc",
|
|
||||||
target_os = "linux"
|
|
||||||
))]
|
|
||||||
use hardened_malloc_rs::HardenedMalloc;
|
|
||||||
|
|
||||||
#[cfg(all(
|
#[cfg(all(
|
||||||
not(target_env = "msvc"),
|
not(target_env = "msvc"),
|
||||||
|
@ -63,7 +52,7 @@ use hardened_malloc_rs::HardenedMalloc;
|
||||||
not(feature = "jemalloc")
|
not(feature = "jemalloc")
|
||||||
))]
|
))]
|
||||||
#[global_allocator]
|
#[global_allocator]
|
||||||
static GLOBAL: HardenedMalloc = HardenedMalloc;
|
static GLOBAL: hardened_malloc_rs::HardenedMalloc = hardened_malloc_rs::HardenedMalloc;
|
||||||
|
|
||||||
struct Server {
|
struct Server {
|
||||||
config: Config,
|
config: Config,
|
||||||
|
|
Loading…
Reference in New Issue