Skip to content
This repository was archived by the owner on Oct 3, 2025. It is now read-only.

Commit 9a90550

Browse files
committed
fix: building with no-std
1 parent a0bfa66 commit 9a90550

File tree

1 file changed

+7
-5
lines changed
  • crates/tinywasm/src/store

1 file changed

+7
-5
lines changed

crates/tinywasm/src/store/mod.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -511,11 +511,13 @@ pub struct SuspendConditions {
511511
impl Debug for SuspendConditions {
512512
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
513513
let stop_cb_text = if self.suspend_cb.is_some() { "<present>" } else { "<not present>" };
514-
f.debug_struct("SuspendConditions")
515-
.field("stop_flag", &self.suspend_flag)
516-
.field("timeout_instant", &self.timeout_instant)
517-
.field("stop_cb", &stop_cb_text)
518-
.finish()
514+
let mut f = f.debug_struct("SuspendConditions");
515+
f.field("stop_flag", &self.suspend_flag);
516+
#[cfg(feature = "std")]
517+
{
518+
f.field("timeout_instant", &self.timeout_instant);
519+
}
520+
f.field("stop_cb", &stop_cb_text).finish()
519521
}
520522
}
521523

0 commit comments

Comments
 (0)