gpui: Sweep through cargo doc output and mark dubious items as non-public (#3932)

I essentially went through the publicly exported items and marked these
that are e.g. leaky reexports as pub(crate). I expect that'd be done on
Tuesday anyways.

Release Notes:
- N/A
This commit is contained in:
Piotr Osiewicz 2024-01-06 23:47:51 +01:00 committed by GitHub
parent ec035724d5
commit dc7f9bbc54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 14 additions and 30 deletions

View file

@ -13,9 +13,14 @@ use parking::{Parker, Unparker};
use parking_lot::Mutex;
use std::{ffi::c_void, ptr::NonNull, sync::Arc, time::Duration};
include!(concat!(env!("OUT_DIR"), "/dispatch_sys.rs"));
/// All items in the generated file are marked as pub, so we're gonna wrap it in a separate mod to prevent
/// these pub items from leaking into public API.
pub(crate) mod dispatch_sys {
include!(concat!(env!("OUT_DIR"), "/dispatch_sys.rs"));
}
pub fn dispatch_get_main_queue() -> dispatch_queue_t {
use dispatch_sys::*;
pub(crate) fn dispatch_get_main_queue() -> dispatch_queue_t {
unsafe { &_dispatch_main_q as *const _ as dispatch_queue_t }
}