Skip to content

Commit 4fb481d

Browse files
authored
Fix allocator + serialization (#481)
1 parent 9a30017 commit 4fb481d

File tree

14 files changed

+133
-1067
lines changed

14 files changed

+133
-1067
lines changed

lessons/257/actix-app/Cargo.lock

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lessons/257/actix-app/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ edition = "2024"
55

66
[dependencies]
77
actix-web = "4"
8+
mimalloc = { version = "0.1.48", default-features = false }
89
serde = { version = "1", features = ["derive"] }
910

1011
[profile.release]

lessons/257/actix-app/src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ mod routes;
33

44
use actix_web::{App, HttpServer, web};
55

6+
#[global_allocator]
7+
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
8+
69
const PORT: u16 = 8080;
710
const THREADS: usize = 2;
811
const API_PATH: &'static str = "/api/v3/ticker/bookTicker";

0 commit comments

Comments
 (0)