mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 11:09:18 +00:00
AK: Remove the fallible constructor from FixedMemoryStream
This commit is contained in:
parent
8b2f23d016
commit
220fbcaa7e
Notes:
sideshowbarker
2024-07-17 08:55:54 +09:00
Author: https://github.com/timschumi
Commit: 220fbcaa7e
Pull-request: https://github.com/SerenityOS/serenity/pull/17264
31 changed files with 185 additions and 209 deletions
|
@ -260,8 +260,8 @@ ParseResult<BlockType> BlockType::parse(AK::Stream& stream)
|
|||
return BlockType {};
|
||||
|
||||
{
|
||||
auto value_stream = FixedMemoryStream::construct(ReadonlyBytes { &kind, 1 }).release_value_but_fixme_should_propagate_errors();
|
||||
if (auto value_type = ValueType::parse(*value_stream); !value_type.is_error())
|
||||
FixedMemoryStream value_stream { ReadonlyBytes { &kind, 1 } };
|
||||
if (auto value_type = ValueType::parse(value_stream); !value_type.is_error())
|
||||
return BlockType { value_type.release_value() };
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue