mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Replace NonZeroU32 and NonZeroUsize with a generic NonZero
The API is identical to core::nonzero::NonZero
This commit is contained in:
parent
4ee1b26b6c
commit
9e4865b6c8
7 changed files with 115 additions and 67 deletions
|
@ -45,10 +45,9 @@ use canvas_traits::canvas::CanvasMsg;
|
|||
use ipc_channel::ipc::IpcSender;
|
||||
use libc::c_void;
|
||||
use net_traits::image_cache::PendingImageId;
|
||||
use nonzero::NonZeroUsize;
|
||||
use nonzero::NonZero;
|
||||
use script_traits::UntrustedNodeAddress;
|
||||
use servo_url::ServoUrl;
|
||||
use std::marker::PhantomData;
|
||||
use std::sync::atomic::AtomicIsize;
|
||||
use style::data::ElementData;
|
||||
|
||||
|
@ -78,8 +77,7 @@ pub struct OpaqueStyleAndLayoutData {
|
|||
// NB: We really store a `StyleAndLayoutData` here, so be careful!
|
||||
#[ignore_heap_size_of = "TODO(#6910) Box value that should be counted but \
|
||||
the type lives in layout"]
|
||||
pub ptr: NonZeroUsize,
|
||||
pub phantom: PhantomData<*mut StyleData>,
|
||||
pub ptr: NonZero<*mut StyleData>,
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue