From e269526020724b705c6b18c8553d2ab8654101fa Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Thu, 1 Feb 2024 21:01:55 -0500 Subject: [PATCH] LibGfx/PNM: Remove two fixmes bab2113ec1f made read_whitespace() return ErrorOr, which makes this easy to do. (7cafd7d177f, which added the fixmes, landed slightly after bab2113ec1f, so not quite sure why it wasn't like this immediately. Maybe commit order got changed during review; both commits were in #17831.) No behavior change. --- .../Libraries/LibGfx/ImageFormats/PortableImageLoaderCommon.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibGfx/ImageFormats/PortableImageLoaderCommon.h b/Userland/Libraries/LibGfx/ImageFormats/PortableImageLoaderCommon.h index 7d29798062..7762336fb0 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/PortableImageLoaderCommon.h +++ b/Userland/Libraries/LibGfx/ImageFormats/PortableImageLoaderCommon.h @@ -116,12 +116,12 @@ static ErrorOr read_whitespace(TContext& context) auto const byte = byte_or_error.value(); if (byte == '#') { - stream.seek(-1, SeekMode::FromCurrentPosition).release_value_but_fixme_should_propagate_errors(); + TRY(stream.seek(-1, SeekMode::FromCurrentPosition)); TRY(read_comment(context)); continue; } if (byte != ' ' && byte != '\t' && byte != '\n' && byte != '\r') { - stream.seek(-1, SeekMode::FromCurrentPosition).release_value_but_fixme_should_propagate_errors(); + TRY(stream.seek(-1, SeekMode::FromCurrentPosition)); if (is_first_char) return Error::from_string_literal("Can't read whitespace from stream"); break;