Merge pull request #7001 from dotCooCoo/fix/wasm-clippy-runtime-default

Updates: Runtime derives Default on wasm32, so wasm32 clippy passes
This commit is contained in:
BFlat
2026-11-13 08:29:29 +07:00
committed by GitHub
2 changed files with 3 additions and 9 deletions
+1
View File
@@ -15,6 +15,7 @@ pub(super) struct SysFallback {
/// The most characters searched for in the font files themselves between two scans of the font
/// folders. Real text has a few uncovered characters; a document of thousands of distinct
/// private-use code points would reread the whole catalog for each.
#[cfg(not(target_arch = "wasm32"))]
pub(super) const MAX_FILE_SEARCHES: u32 = 1024;
/// Fonts made for Thai, tried first (when installed) for Thai the font in use lacks: Windows
+2 -9
View File
@@ -9,6 +9,7 @@ use craft_update::updater::{Action, Status, Updater};
#[cfg(not(target_arch = "wasm32"))]
use craft_update::{CheckResultDialog, CheckResultResponse};
#[cfg_attr(target_arch = "wasm32", derive(Default))]
pub(crate) struct Runtime {
#[cfg(not(target_arch = "wasm32"))]
updater: Updater,
@@ -30,23 +31,15 @@ pub(crate) struct Runtime {
pub(crate) status_message: Option<String>,
}
#[cfg(not(target_arch = "wasm32"))]
impl Default for Runtime {
fn default() -> Self {
Self {
#[cfg(not(target_arch = "wasm32"))]
updater: Updater::new(&crate::UPDATE_APP, env!("CARGO_PKG_VERSION")),
#[cfg(not(target_arch = "wasm32"))]
startup_check: false,
#[cfg(not(target_arch = "wasm32"))]
check_requested: false,
#[cfg(not(target_arch = "wasm32"))]
repaint: None,
#[cfg(not(target_arch = "wasm32"))]
was_blocking: false,
#[cfg(target_arch = "wasm32")]
manual_window_open: false,
#[cfg(target_arch = "wasm32")]
status_message: None,
}
}
}