From 94e8ce5739677db8bd4c0ffbe50d035b37fafe51 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Wed, 8 Jan 2020 23:44:56 +0530 Subject: Make next_input_id an InputId --- components/script/dom/fakexrdevice.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'components/script/dom') diff --git a/components/script/dom/fakexrdevice.rs b/components/script/dom/fakexrdevice.rs index 7b55cb44b86..f43b0b1155b 100644 --- a/components/script/dom/fakexrdevice.rs +++ b/components/script/dom/fakexrdevice.rs @@ -37,7 +37,8 @@ pub struct FakeXRDevice { reflector: Reflector, #[ignore_malloc_size_of = "defined in ipc-channel"] sender: IpcSender, - next_input_id: Cell, + #[ignore_malloc_size_of = "defined in webxr-api"] + next_input_id: Cell, } impl FakeXRDevice { @@ -45,7 +46,7 @@ impl FakeXRDevice { FakeXRDevice { reflector: Reflector::new(), sender, - next_input_id: Cell::new(0), + next_input_id: Cell::new(InputId(0)), } } @@ -191,8 +192,7 @@ impl FakeXRDeviceMethods for FakeXRDevice { init: &FakeXRInputSourceInit, ) -> Fallible> { let id = self.next_input_id.get(); - self.next_input_id.set(id + 1); - let id = InputId(id); + self.next_input_id.set(InputId(id.0 + 1)); let handedness = init.handedness.into(); let target_ray_mode = init.targetRayMode.into(); -- cgit v1.2.3