rustpkg: Cleanup
auto merge of #9150 : catamorphism/rust/rustpkg-cleanup, r=catamorphism

Just refactoring in tests.rs.