Skip to content

Commit

Permalink
use error
Browse files Browse the repository at this point in the history
  • Loading branch information
ia0 committed Feb 7, 2025
1 parent eca0cfa commit ca51e7d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/rust/rng_test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
//! Tests that the random number generator is working properly.
#![no_std]

use wasefire::error::Code;
wasefire::applet!();

fn main() {
Expand All @@ -24,7 +26,7 @@ fn main() {

fn test_non_constant() {
debug!("test_non_constant(): This should generate 5 different buffers.");
if rng::fill_bytes(&mut []).is_err() {
if rng::fill_bytes(&mut []) == Err(Error::world(Code::NotImplemented)) {
debug!("- not supported");
scheduling::exit();
}
Expand Down

0 comments on commit ca51e7d

Please sign in to comment.