diff options
| author | Fuwn <[email protected]> | 2021-05-20 01:05:29 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-20 01:05:29 -0700 |
| commit | 6ded95c2ddff939c6f9a7eb7a49aa56ff4c571bf (patch) | |
| tree | aea8b46f0b1120040124ee5e603a176932407812 | |
| parent | ci(actions): pin os (diff) | |
| download | whirl-6ded95c2ddff939c6f9a7eb7a49aa56ff4c571bf.tar.xz whirl-6ded95c2ddff939c6f9a7eb7a49aa56ff4c571bf.zip | |
refactor(whirl): simplify allocator cfg condition
| -rw-r--r-- | whirl/Cargo.toml | 4 | ||||
| -rw-r--r-- | whirl/src/lib.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/whirl/Cargo.toml b/whirl/Cargo.toml index b30c787..a319d63 100644 --- a/whirl/Cargo.toml +++ b/whirl/Cargo.toml @@ -64,9 +64,9 @@ whirl_prompt = { path = "../whirl_prompt" } whirl_server = { path = "../whirl_server" } # Allocator -[target.'cfg(target_family = "windows")'.dependencies] +[target.'cfg(windows)'.dependencies] mimalloc = { version = "0.1.25", default-features = false } -[target.'cfg(target_family = "unix")'.dependencies] +[target.'cfg(unix)'.dependencies] jemallocator = "0.3.2" diff --git a/whirl/src/lib.rs b/whirl/src/lib.rs index 49a75f5..c9329f3 100644 --- a/whirl/src/lib.rs +++ b/whirl/src/lib.rs @@ -20,11 +20,11 @@ extern crate serde_derive; // #[macro_use] // extern crate simple_error; -#[cfg(target_family = "windows")] +#[cfg(windows)] #[global_allocator] static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; -#[cfg(target_family = "unix")] +#[cfg(unix)] #[global_allocator] static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc; |