butcher/main: use mimalloc

This commit is contained in:
Astro 2023-10-02 00:00:52 +02:00
parent bdd3fcb467
commit ec77526a6b
3 changed files with 5 additions and 0 deletions

1
Cargo.lock generated
View File

@ -359,6 +359,7 @@ dependencies = [
"metrics",
"metrics-exporter-prometheus",
"metrics-util",
"mimalloc",
"rand",
"reqwest",
"serde",

View File

@ -20,3 +20,4 @@ texting_robots = "0.2"
metrics = "0.20"
metrics-util = "0.14"
metrics-exporter-prometheus = "0.11"
mimalloc = { version = "*", default-features = false }

View File

@ -14,6 +14,9 @@ use trend_setter::UpdateSet;
mod config;
mod trend_setter;
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
async fn is_profane(profanity: &WordList, post: &Post) -> bool {
if post.sensitive == Some(true) {
return true;