diff --git a/src/main.rs b/src/main.rs index 54fbf38a..ff68eca4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -55,8 +55,12 @@ const fn git_revision() -> &'static str { { git_version::git_version!() } + // I would reach for unwrap_or but it's not const fn yet #[cfg(target_arch = "wasm32")] - option_env!("LUMINOL_VERSION").unwrap_or(git_version::git_version!()) + match option_env!("LUMINOL_VERSION") { + Some(v) => v, + None => git_version::git_version!(), + } } pub const BUILD_DIAGNOSTIC: luminol_core::BuildDiagnostics = luminol_core::BuildDiagnostics {