Skip to content

Commit

Permalink
Added a small improvement to interner tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Razican committed Jan 23, 2022
1 parent 94efa38 commit eb61895
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion boa_interner/src/tests.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use crate::{Interner, Sym};
use std::num::NonZeroUsize;

#[track_caller]
fn sym_from_usize(index: usize) -> Sym {
Sym::from_raw(NonZeroUsize::new(index).unwrap())
Sym::from_raw(NonZeroUsize::new(index).expect("Invalid NonZeroUsize"))
}

#[test]
Expand Down

0 comments on commit eb61895

Please sign in to comment.