♻️ Use of "target_family" instead of feature to manage wasm platform

This commit is contained in:
2024-05-21 12:38:40 +02:00
parent f43f54c120
commit a1fe74f53e
4 changed files with 66 additions and 43 deletions

View File

@@ -16,13 +16,13 @@ use tracing_subscriber::prelude::*;
use tracing_subscriber::EnvFilter;
cfg_if! {
if #[cfg(feature = "desktop")] {
if #[cfg(target_family = "wasm")] {
use tracing_web::MakeWebConsoleWriter;
} else {
use dioxus::desktop::Config;
use std::fs::File;
use time::format_description::well_known::Iso8601;
use tracing_subscriber::fmt::time::UtcTime;
} else if #[cfg(feature = "web")] {
use tracing_web::MakeWebConsoleWriter;
}
}