Fix ./mach build --no-default-features (#35922)

Fix build failures when building without default features.

Testing: This was manually tested, but this PR does not add automated
tests of `--no-default-features` to CI.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
Jonathan Schwender 2025-08-18 20:40:08 +02:00 committed by GitHub
parent ec5872992b
commit 25fea1e086
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 15 additions and 13 deletions

View file

@ -17,14 +17,12 @@ use winit::event_loop::ActiveEventLoop;
use super::window_trait::WindowPortsMethods;
#[cfg(feature = "webxr")]
enum XrDiscovery {
GlWindow(GlWindowDiscovery),
#[cfg(target_os = "windows")]
OpenXr(OpenXrDiscovery),
}
#[cfg(feature = "webxr")]
pub(crate) struct XrDiscoveryWebXrRegistry {
xr_discovery: RefCell<Option<XrDiscovery>>,
}
@ -75,7 +73,6 @@ impl prefs::Observer for XrPrefObserver {
}
}
#[cfg(feature = "webxr")]
impl WebXrRegistry for XrDiscoveryWebXrRegistry {
fn register(&self, xr: &mut servo::webxr::MainThreadRegistry) {
use servo::webxr::headless::HeadlessMockDiscovery;