Skip to content

Commit

Permalink
rust/no_std_test: Stop using deprecated get_ functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobsonchase committed Oct 19, 2021
1 parent e14a390 commit 577a963
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/rust_usage_test/tests/no_std_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ static MONSTER_DATA: &[u8] = include_bytes!("../../monsterdata_test.mon");
// Note: Copied from `bin/monster_example.rs`
#[test]
fn no_std_example_data() {
let monster = my_game::example::get_root_as_monster(MONSTER_DATA);
let monster = my_game::example::root_as_monster(MONSTER_DATA).unwrap();

assert_eq!(monster.hp(), 80);
assert_eq!(monster.mana(), 150);
Expand All @@ -29,7 +29,7 @@ fn build_mon<'a, 'b>(
) -> my_game::example::Monster<'a> {
let mon = my_game::example::Monster::create(builder, &args);
my_game::example::finish_monster_buffer(builder, mon);
my_game::example::get_root_as_monster(builder.finished_data())
my_game::example::root_as_monster(builder.finished_data()).unwrap()
}

#[test]
Expand Down

0 comments on commit 577a963

Please sign in to comment.