mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
LibSQL: Replace Result<T, E> use with ErrorOr<T>
This commit is contained in:
parent
fbe8f185b5
commit
72f3fd824e
2 changed files with 3 additions and 4 deletions
|
@ -44,7 +44,7 @@ Heap::Heap(String file_name)
|
|||
dbgln_if(SQL_DEBUG, "Heap file {} opened. Size = {}", file_name, size());
|
||||
}
|
||||
|
||||
Result<ByteBuffer, String> Heap::read_block(u32 block)
|
||||
ErrorOr<ByteBuffer> Heap::read_block(u32 block)
|
||||
{
|
||||
auto buffer_or_empty = m_write_ahead_log.get(block);
|
||||
if (buffer_or_empty.has_value())
|
||||
|
@ -56,7 +56,7 @@ Result<ByteBuffer, String> Heap::read_block(u32 block)
|
|||
VERIFY_NOT_REACHED();
|
||||
auto ret = m_file->read(BLOCKSIZE);
|
||||
if (ret.is_empty())
|
||||
return String("Could not read block");
|
||||
return Error::from_string_literal("Could not read block"sv);
|
||||
dbgln_if(SQL_DEBUG, "{:02x} {:02x} {:02x} {:02x} {:02x} {:02x} {:02x} {:02x}",
|
||||
*ret.offset_pointer(0), *ret.offset_pointer(1),
|
||||
*ret.offset_pointer(2), *ret.offset_pointer(3),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue