mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
cli/tarball read_header return tuple directly
This commit is contained in:
parent
46da864fea
commit
70d005fde5
1 changed files with 2 additions and 2 deletions
|
@ -274,11 +274,11 @@ fn read_header<'a>(
|
||||||
// (We can't use that for the parser state and still return Module<'a> unfortunately.)
|
// (We can't use that for the parser state and still return Module<'a> unfortunately.)
|
||||||
let arena_buf = bumpalo::collections::Vec::from_iter_in(buf.iter().copied(), arena);
|
let arena_buf = bumpalo::collections::Vec::from_iter_in(buf.iter().copied(), arena);
|
||||||
let parse_state = State::new(arena_buf.into_bump_slice());
|
let parse_state = State::new(arena_buf.into_bump_slice());
|
||||||
let (module, state) = parse_header(arena, parse_state).unwrap_or_else(|_err| {
|
let result = parse_header(arena, parse_state).unwrap_or_else(|_err| {
|
||||||
todo!(); // TODO report a nice error and exit 1 - or maybe just return Err, for better testability?
|
todo!(); // TODO report a nice error and exit 1 - or maybe just return Err, for better testability?
|
||||||
});
|
});
|
||||||
|
|
||||||
Ok((module, state))
|
Ok(result)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn add_ingested_files<W: Write>(
|
fn add_ingested_files<W: Write>(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue