1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:57:45 +00:00

LibCompress: Add two missing return statements

This commit is contained in:
Nico Weber 2022-12-26 09:36:56 -05:00 committed by Tim Flynn
parent 9d5049230c
commit c96e663b0a

View file

@ -415,7 +415,7 @@ ErrorOr<void> DeflateDecompressor::decode_codes(CanonicalCode& literal_code, Opt
auto literal_code_result = CanonicalCode::from_bytes(code_lengths.span().trim(literal_code_count));
if (!literal_code_result.has_value())
Error::from_string_literal("Failed to decode the literal code");
return Error::from_string_literal("Failed to decode the literal code");
literal_code = literal_code_result.value();
// Now we extract the code that was used to encode distances in the block.
@ -431,7 +431,7 @@ ErrorOr<void> DeflateDecompressor::decode_codes(CanonicalCode& literal_code, Opt
auto distance_code_result = CanonicalCode::from_bytes(code_lengths.span().slice(literal_code_count));
if (!distance_code_result.has_value())
Error::from_string_literal("Failed to decode the distance code");
return Error::from_string_literal("Failed to decode the distance code");
distance_code = distance_code_result.value();
return {};