mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:27:34 +00:00
LibCore: Make ArgParser::Option::accept_value return ErrorOr<bool>
This commit makes the `ArgParser::Option::accept_value` property more error-safe by ensuring it returns an ErrorOr<bool> instead of just a bool.
This commit is contained in:
parent
0315ee5937
commit
abbfb00a02
2 changed files with 27 additions and 19 deletions
|
@ -51,7 +51,7 @@ public:
|
|||
char const* long_name { nullptr };
|
||||
char short_name { 0 };
|
||||
char const* value_name { nullptr };
|
||||
Function<bool(StringView)> accept_value;
|
||||
Function<ErrorOr<bool>(StringView)> accept_value;
|
||||
OptionHideMode hide_mode { OptionHideMode::None };
|
||||
|
||||
DeprecatedString name_for_display() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue