Tidy up trap-handling code.

This commit is contained in:
Dan Gohman
2018-12-19 15:12:56 -08:00
parent 4d4ecfd812
commit c4e10227de
13 changed files with 60 additions and 21 deletions

View File

@@ -253,7 +253,7 @@ impl WastContext {
) -> Result<(), WastFileError> {
let mut parser = ScriptParser::from_str(str::from_utf8(wast).unwrap()).unwrap();
while let Some(Command { kind, line }) = parser.next().unwrap() {
while let Some(Command { kind, line }) = parser.next().expect("parser") {
match kind {
CommandKind::Module { module, name } => {
self.module(isa, name, module)