Use new std::num::NonZero* types instead of deprecated core::nonzero::NonZero

This commit is contained in:
Simon Sapin 2018-03-29 16:26:07 +02:00
parent 3d6614e314
commit 52dceb3d5f
5 changed files with 114 additions and 143 deletions

View file

@ -14,7 +14,7 @@ use ipc_channel::ipc::{self, IpcSharedMemory};
use libc::c_void;
use msg::constellation_msg::{PipelineId, PipelineIndex, PipelineNamespaceId};
use net_traits::image::base::{Image, PixelFormat};
use nonzero::NonZero;
use nonzero::NonZeroU32;
use profile_traits::time::{self, ProfilerCategory, profile};
use script_traits::{AnimationState, AnimationTickType, ConstellationMsg, LayoutControlMsg};
use script_traits::{MouseButton, MouseEventType, ScrollState, TouchEventType, TouchId};
@ -64,7 +64,7 @@ impl ConvertPipelineIdFromWebRender for webrender_api::PipelineId {
fn from_webrender(&self) -> PipelineId {
PipelineId {
namespace_id: PipelineNamespaceId(self.0),
index: PipelineIndex(NonZero::new(self.1).expect("Webrender pipeline zero?")),
index: PipelineIndex(NonZeroU32::new(self.1).expect("Webrender pipeline zero?")),
}
}
}