Skip to content

Commit b6629ca

Browse files
committed
Resolve minor build issue
1 parent b6d2fcf commit b6629ca

File tree

1 file changed

+6
-3
lines changed
  • crates/vm/src/metrics/cycle_tracker

1 file changed

+6
-3
lines changed

crates/vm/src/metrics/cycle_tracker/mod.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
#[derive(Clone, Debug, Default)]
33
pub struct SpanInfo {
44
/// The name of the span.
5-
tag: String,
5+
pub tag: String,
66
/// The cycle count at which the span starts.
7-
start: usize,
7+
pub start: usize,
88
}
99

1010
#[derive(Clone, Debug, Default)]
@@ -21,7 +21,10 @@ impl CycleTracker {
2121
}
2222

2323
pub fn top(&self) -> Option<&String> {
24-
self.stack.last()
24+
match self.stack.last() {
25+
Some(span) => Some(&span.tag),
26+
_ => None
27+
}
2528
}
2629

2730
/// Starts a new cycle tracker span for the given name.

0 commit comments

Comments
 (0)