Strict import formatting (grouping and granularity) (#30325)

* strict imports formatting

* Reformat all imports
This commit is contained in:
Samson 2023-09-11 21:16:54 +02:00 committed by GitHub
parent 413da4ca69
commit aad2dccc9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
802 changed files with 6861 additions and 6395 deletions

View file

@ -7,17 +7,18 @@
#[global_allocator]
static ALLOC: Allocator = Allocator;
pub use crate::platform::*;
#[cfg(not(windows))]
pub use jemalloc_sys;
pub use crate::platform::*;
#[cfg(not(windows))]
mod platform {
use jemalloc_sys as ffi;
use std::alloc::{GlobalAlloc, Layout};
use std::os::raw::{c_int, c_void};
use jemalloc_sys as ffi;
/// Get the size of a heap block.
pub unsafe extern "C" fn usable_size(ptr: *const c_void) -> usize {
ffi::malloc_usable_size(ptr as *const _)
@ -100,6 +101,7 @@ mod platform {
mod platform {
pub use std::alloc::System as Allocator;
use std::os::raw::c_void;
use winapi::um::heapapi::{GetProcessHeap, HeapSize, HeapValidate};
/// Get the size of a heap block.