mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:04:59 +00:00
AK: Remove the fallible constructor from FixedMemoryStream
This commit is contained in:
parent
8b2f23d016
commit
220fbcaa7e
31 changed files with 185 additions and 209 deletions
|
@ -252,8 +252,8 @@ static Optional<Wasm::Module> parse(StringView filename)
|
|||
return {};
|
||||
}
|
||||
|
||||
auto stream = FixedMemoryStream::construct(ReadonlyBytes { result.value()->data(), result.value()->size() }).release_value_but_fixme_should_propagate_errors();
|
||||
auto parse_result = Wasm::Module::parse(*stream);
|
||||
FixedMemoryStream stream { ReadonlyBytes { result.value()->data(), result.value()->size() } };
|
||||
auto parse_result = Wasm::Module::parse(stream);
|
||||
if (parse_result.is_error()) {
|
||||
warnln("Something went wrong, either the file is invalid, or there's a bug with LibWasm!");
|
||||
warnln("The parse error was {}", Wasm::parse_error_to_deprecated_string(parse_result.error()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue