fix: feature gate tokio and tracing (#4651)

Signed-off-by: Omar Mohamed <mohamed.omar67492@gmail.com>
This commit is contained in:
Omar Mohamed Khallaf authored and GitHub committed 2025-09-09 19:45:15 +01:00
1 parent 284d6ea68e
commit a9ef9af980
3 files changed
+5

No files matched your search

+2
View File
@@ -35,10 +35,12 @@ impl NetProvider<Resource> for DioxusNativeNetProvider {
if request.url.scheme() == "dioxus" {
match dioxus_asset_resolver::native::serve_asset(request.url.path()) {
Ok(res) => {
#[cfg(feature = "tracing")]
tracing::trace!("fetching asset from file system success {request:#?}");
handler.bytes(doc_id, res.into_body().into(), self.callback.clone())
}
Err(_) => {
#[cfg(feature = "tracing")]
tracing::warn!("fetching asset from file system error {request:#?}");
}
}