summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2019-06-17 18:13:31 -0700
committerDaniel Mueller <deso@posteo.net>2019-06-17 18:13:31 -0700
commit4094d8d0592c507f322681b070b0fa0fefccd673 (patch)
tree9244a61707942d2a4831e5cb955c81ebbf008bcf
parente1fc56bf92ab5d93e200e8ac32f197c5fa27846e (diff)
downloadnitrocli-4094d8d0592c507f322681b070b0fa0fefccd673.tar.gz
nitrocli-4094d8d0592c507f322681b070b0fa0fefccd673.tar.bz2
Remove explicit change of global allocator
This change removes the explicit change of the global allocator to the system allocator that we introduced a while back. The reason this was needed in the past was due to Rust's use of jemalloc in the default configuration, which increases binary size quite significantly. However, with Rust issue #36963 fixed, jemalloc is now an explicit opt-in and the system allocator is the default choice -- rendering our explicit change rather pointless.
-rw-r--r--nitrocli/src/main.rs8
1 files changed, 0 insertions, 8 deletions
diff --git a/nitrocli/src/main.rs b/nitrocli/src/main.rs
index 5cb3faf..ffc2744 100644
--- a/nitrocli/src/main.rs
+++ b/nitrocli/src/main.rs
@@ -79,7 +79,6 @@ mod pinentry;
#[cfg(test)]
mod tests;
-use std::alloc;
use std::env;
use std::ffi;
use std::io;
@@ -88,13 +87,6 @@ use std::result;
use crate::error::Error;
-// Switch from the default allocator (typically jemalloc) to the system
-// allocator (malloc based on Unix systems). Our application is by no
-// means allocation intensive and the default allocator is typically
-// much larger in size, causing binary bloat.
-#[global_allocator]
-static A: alloc::System = alloc::System;
-
type Result<T> = result::Result<T, Error>;
const NITROCLI_ADMIN_PIN: &str = "NITROCLI_ADMIN_PIN";