1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:08:12 +00:00

Shell: Convert all immediately convertible fallible functions to ErrorOr

This commit is contained in:
Ali Mohammad Pur 2023-02-18 17:39:41 +03:30 committed by Ali Mohammad Pur
parent e403dbabfa
commit 0c28fd41ed
7 changed files with 59 additions and 50 deletions

View file

@ -1903,8 +1903,8 @@ RefPtr<AST::Node> Parser::parse_bareword()
auto first_slash_index = string.find_byte_offset('/');
if (first_slash_index.has_value()) {
username = string.substring_from_byte_offset(1, *first_slash_index).release_value_but_fixme_should_propagate_errors();
string = string.substring_from_byte_offset(*first_slash_index + 1).release_value_but_fixme_should_propagate_errors();
username = string.substring_from_byte_offset(1, *first_slash_index - 1).release_value_but_fixme_should_propagate_errors();
string = string.substring_from_byte_offset(*first_slash_index).release_value_but_fixme_should_propagate_errors();
} else {
username = string.substring_from_byte_offset(1).release_value_but_fixme_should_propagate_errors();
string = {};