Skip to content

Commit

Permalink
Fix a failing test on main (#615)
Browse files Browse the repository at this point in the history
Currently `(start $f)` fails to compile because the loop that parses
values expected a `(result ..)` to always be present, but it is not
alwyas guaranteed to be present.
  • Loading branch information
alexcrichton committed May 19, 2022
1 parent 16af83e commit 0d7b191
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/wast/src/component/component.rs
Expand Up @@ -211,7 +211,7 @@ impl<'a> Parse<'a> for Start<'a> {
parser.parse::<kw::start>()?;
let func = parser.parse::<IndexOrRef<_>>()?.0;
let mut args = Vec::new();
while !parser.peek2::<kw::result>() {
while !parser.is_empty() && !parser.peek2::<kw::result>() {
args.push(parser.parse()?);
}
let result = if !parser.is_empty() {
Expand Down

0 comments on commit 0d7b191

Please sign in to comment.