style: Manually extinguish multi-line use statements.

This commit is contained in:
Emilio Cobos Álvarez 2018-11-10 21:26:46 +01:00
parent 212b3e1311
commit bd9c53c5da
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
19 changed files with 46 additions and 67 deletions

View file

@ -5,10 +5,7 @@
//! Global style data
use crate::context::StyleSystemOptions;
use crate::gecko_bindings::bindings::Gecko_SetJemallocThreadLocalArena;
use crate::gecko_bindings::bindings::{
Gecko_RegisterProfilerThread, Gecko_UnregisterProfilerThread,
};
use crate::gecko_bindings::bindings;
use crate::parallel::STYLE_THREAD_STACK_SIZE_KB;
use crate::shared_lock::SharedRwLock;
use crate::thread_state;
@ -43,20 +40,20 @@ fn thread_name(index: usize) -> String {
fn thread_startup(index: usize) {
thread_state::initialize_layout_worker_thread();
unsafe {
Gecko_SetJemallocThreadLocalArena(true);
bindings::Gecko_SetJemallocThreadLocalArena(true);
}
let name = thread_name(index);
let name = CString::new(name).unwrap();
unsafe {
// Gecko_RegisterProfilerThread copies the passed name here.
Gecko_RegisterProfilerThread(name.as_ptr());
bindings::Gecko_RegisterProfilerThread(name.as_ptr());
}
}
fn thread_shutdown(_: usize) {
unsafe {
Gecko_UnregisterProfilerThread();
Gecko_SetJemallocThreadLocalArena(false);
bindings::Gecko_UnregisterProfilerThread();
bindings::Gecko_SetJemallocThreadLocalArena(false);
}
}