aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webxr/fakexrinputcontroller.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2025-01-10 03:19:19 -0500
committerGitHub <noreply@github.com>2025-01-10 08:19:19 +0000
commitc94d909a8688589209cdf0c7ae58e40f9b8c411e (patch)
tree12febf23eed4438249fd4d276c4d8b35dee22a97 /components/script/dom/webxr/fakexrinputcontroller.rs
parentf220d6d3a52296794cd19935e9e59cc75a179a44 (diff)
downloadservo-c94d909a8688589209cdf0c7ae58e40f9b8c411e.tar.gz
servo-c94d909a8688589209cdf0c7ae58e40f9b8c411e.zip
script: Limit public exports. (#34915)
* script: Restrict reexport visibility of DOM types. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Mass pub->pub(crate) conversion. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Hide existing dead code warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix unit tests. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * More formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Diffstat (limited to 'components/script/dom/webxr/fakexrinputcontroller.rs')
-rw-r--r--components/script/dom/webxr/fakexrinputcontroller.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/components/script/dom/webxr/fakexrinputcontroller.rs b/components/script/dom/webxr/fakexrinputcontroller.rs
index e52dc0a21fd..07257311da6 100644
--- a/components/script/dom/webxr/fakexrinputcontroller.rs
+++ b/components/script/dom/webxr/fakexrinputcontroller.rs
@@ -26,7 +26,7 @@ use crate::dom::globalscope::GlobalScope;
use crate::script_runtime::CanGc;
#[dom_struct]
-pub struct FakeXRInputController {
+pub(crate) struct FakeXRInputController {
reflector: Reflector,
#[ignore_malloc_size_of = "defined in ipc-channel"]
#[no_trace]
@@ -37,7 +37,10 @@ pub struct FakeXRInputController {
}
impl FakeXRInputController {
- pub fn new_inherited(sender: IpcSender<MockDeviceMsg>, id: InputId) -> FakeXRInputController {
+ pub(crate) fn new_inherited(
+ sender: IpcSender<MockDeviceMsg>,
+ id: InputId,
+ ) -> FakeXRInputController {
FakeXRInputController {
reflector: Reflector::new(),
sender,
@@ -45,7 +48,7 @@ impl FakeXRInputController {
}
}
- pub fn new(
+ pub(crate) fn new(
global: &GlobalScope,
sender: IpcSender<MockDeviceMsg>,
id: InputId,
@@ -181,7 +184,7 @@ impl Convert<MockButtonType> for FakeXRButtonType {
}
/// <https://immersive-web.github.io/webxr-test-api/#parse-supported-buttons>
-pub fn init_to_mock_buttons(buttons: &[FakeXRButtonStateInit]) -> Vec<MockButton> {
+pub(crate) fn init_to_mock_buttons(buttons: &[FakeXRButtonStateInit]) -> Vec<MockButton> {
let supported: Vec<MockButton> = buttons
.iter()
.map(|b| MockButton {