Skip to content

Commit

Permalink
🎨 移除 mimalloc dev 依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
AlongWY committed Sep 6, 2022
1 parent c999b63 commit 86ad5f6
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 35 deletions.
4 changes: 2 additions & 2 deletions python/extension/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#[cfg(feature = "malloc")]
#[cfg(feature = "mimalloc")]
use mimalloc::MiMalloc;

#[cfg(feature = "malloc")]
#[cfg(feature = "mimalloc")]
#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;

Expand Down
4 changes: 2 additions & 2 deletions rust/ltp-cffi/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#[cfg(feature = "malloc")]
#[cfg(feature = "mimalloc")]
use mimalloc::MiMalloc;

#[cfg(feature = "malloc")]
#[cfg(feature = "mimalloc")]
#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;

Expand Down
3 changes: 0 additions & 3 deletions rust/ltp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,3 @@ clap = { version = "3", features = ["derive"] }

ndarray = "0.15"
ndarray-npy = { version = "0.8", features = ["npz"] }

[target.'cfg(not(target_env = "musl"))'.dependencies]
mimalloc = { version = "0.1", default-features = false }
7 changes: 0 additions & 7 deletions rust/ltp/examples/cws.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
#[cfg(not(target_env = "musl"))]
use mimalloc::MiMalloc;

#[cfg(not(target_env = "musl"))]
#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;

use anyhow::Result;
use clap::{ArgEnum, Parser};
use itertools::Itertools;
Expand Down
7 changes: 0 additions & 7 deletions rust/ltp/examples/ner.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
#[cfg(not(target_env = "musl"))]
use mimalloc::MiMalloc;

#[cfg(not(target_env = "musl"))]
#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;

use anyhow::Result;
use clap::{ArgEnum, Parser};
use itertools::Itertools;
Expand Down
7 changes: 0 additions & 7 deletions rust/ltp/examples/pos.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
#[cfg(not(target_env = "musl"))]
use mimalloc::MiMalloc;

#[cfg(not(target_env = "musl"))]
#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;

use anyhow::Result;
use clap::{ArgEnum, Parser};
use itertools::Itertools;
Expand Down
7 changes: 0 additions & 7 deletions rust/ltp/examples/simple.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
#[cfg(not(target_env = "musl"))]
use mimalloc::MiMalloc;

#[cfg(not(target_env = "musl"))]
#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;

use itertools::multizip;
use ltp::{CWSModel, Codec, Format, ModelSerde, NERModel, POSModel};
use std::fs::File;
Expand Down

0 comments on commit 86ad5f6

Please sign in to comment.