Skip to content

Commit 6d0099b

Browse files
committed
bb02_async: compile block_on only in testing
Not needed anymore in production code. As a result, we can also remove the screen processing, which is not relevant to the Rust unit tests.
1 parent 3d65f25 commit 6d0099b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rust/bitbox02-rust/src/bb02_async.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ pub fn option<O>(option: &RefCell<Option<O>>) -> AsyncOption<'_, O> {
5959
}
6060

6161
/// Polls a future until the result is available.
62+
#[cfg(feature = "testing")]
6263
pub fn block_on<O>(task: impl core::future::Future<Output = O>) -> O {
6364
let mut task: crate::bb02_async::Task<O> = alloc::boxed::Box::pin(task);
6465
loop {
65-
bitbox02::ui::screen_process();
6666
if let Poll::Ready(result) = spin(&mut task) {
6767
return result;
6868
}

0 commit comments

Comments
 (0)