From 3f362de1ab94b994ef4ccdc403cab4cb8d0d1bcb Mon Sep 17 00:00:00 2001 From: Andreas Grois Date: Tue, 30 Nov 2021 09:17:38 +0100 Subject: Move global allocator selection to swaystatus-plugin. This way plugins needn't set it manually. --- swaystatus-plugin/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'swaystatus-plugin') diff --git a/swaystatus-plugin/src/lib.rs b/swaystatus-plugin/src/lib.rs index e54e057..95ecdf2 100644 --- a/swaystatus-plugin/src/lib.rs +++ b/swaystatus-plugin/src/lib.rs @@ -48,6 +48,9 @@ pub static RUSTC_VERSION : &str = env!("RUSTC_VERSION"); #[doc(hidden)] pub static MODULE_VERSION : &str = env!("CARGO_PKG_VERSION"); +#[global_allocator] +static GLOBAL : std::alloc::System = std::alloc::System; + /// Declares a public export C function that creates your plugin's main object. /// parameters are: The plugin's concrete type, and the constructor function for it. /// This is blatantly stolen from -- cgit v1.2.3