mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
[NFC] servoshell: fix rust-analyzer and rustfmt breakage (#30340)
This commit is contained in:
parent
1bbd0c1e6e
commit
90ad5920e2
20 changed files with 271 additions and 216 deletions
|
@ -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"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue