mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Remove components/nonzero, use std::num::NonZero instead
This commit is contained in:
parent
d55a003c92
commit
e39f741321
15 changed files with 5 additions and 158 deletions
|
@ -5,9 +5,9 @@
|
|||
//! The high-level interface from script to constellation. Using this abstract interface helps
|
||||
//! reduce coupling between these two components.
|
||||
|
||||
use nonzero::NonZeroU32;
|
||||
use std::cell::Cell;
|
||||
use std::fmt;
|
||||
use std::num::NonZeroU32;
|
||||
use webrender_api;
|
||||
|
||||
#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
|
||||
|
@ -390,15 +390,11 @@ impl fmt::Display for HistoryStateId {
|
|||
// We provide ids just for unit testing.
|
||||
pub const TEST_NAMESPACE: PipelineNamespaceId = PipelineNamespaceId(1234);
|
||||
#[allow(unsafe_code)]
|
||||
#[cfg(feature = "unstable")]
|
||||
pub const TEST_PIPELINE_INDEX: PipelineIndex = unsafe { PipelineIndex(NonZeroU32::new_unchecked(5678)) };
|
||||
#[cfg(feature = "unstable")]
|
||||
pub const TEST_PIPELINE_ID: PipelineId = PipelineId { namespace_id: TEST_NAMESPACE, index: TEST_PIPELINE_INDEX };
|
||||
#[allow(unsafe_code)]
|
||||
#[cfg(feature = "unstable")]
|
||||
pub const TEST_BROWSING_CONTEXT_INDEX: BrowsingContextIndex =
|
||||
unsafe { BrowsingContextIndex(NonZeroU32::new_unchecked(8765)) };
|
||||
#[cfg(feature = "unstable")]
|
||||
pub const TEST_BROWSING_CONTEXT_ID: BrowsingContextId =
|
||||
BrowsingContextId { namespace_id: TEST_NAMESPACE, index: TEST_BROWSING_CONTEXT_INDEX };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue