[NFC] servoshell: fix rust-analyzer and rustfmt breakage (#30340)

This commit is contained in:
Delan Azabani 2023-09-12 14:27:10 +08:00 committed by GitHub
parent 1bbd0c1e6e
commit 90ad5920e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 271 additions and 216 deletions

View file

@ -20,13 +20,52 @@
// mode is turned on.
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
#[cfg(not(target_os = "android"))]
include!("main2.rs");
cfg_if::cfg_if! {
if #[cfg(not(target_os = "android"))] {
#[cfg(any(target_os = "macos", target_os = "linux"))]
#[macro_use]
extern crate sig;
#[cfg(target_os = "android")]
pub fn main() {
println!(
"Cannot start /ports/servo/ on Android. \
Use /support/android/apk/ + /ports/libsimpleservo/ instead"
);
#[cfg(test)]
mod test;
mod app;
mod backtrace;
mod browser;
mod crash_handler;
mod egui_glue;
mod embedder;
mod events_loop;
mod headed_window;
mod headless_window;
mod keyutils;
mod main2;
mod minibrowser;
mod parser;
mod prefs;
mod resources;
mod window_trait;
pub mod platform {
#[cfg(target_os = "macos")]
pub use crate::platform::macos::deinit;
#[cfg(target_os = "macos")]
pub mod macos;
#[cfg(not(target_os = "macos"))]
pub fn deinit(_clean_shutdown: bool) {}
}
pub fn main() {
main2::main()
}
} else {
pub fn main() {
println!(
"Cannot start /ports/servo/ on Android. \
Use /support/android/apk/ + /ports/libsimpleservo/ instead"
);
}
}
}