mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
Everywhere: Split Error::from_string_literal and Error::from_string_view
Error::from_string_literal now takes direct char const*s, while Error::from_string_view does what Error::from_string_literal used to do: taking StringViews. This change will remove the need to insert `sv` after error strings when returning string literal errors once StringView(char const*) is removed. No functional changes.
This commit is contained in:
@@ -277,7 +277,7 @@ ErrorOr<NonnullOwnPtr<SOCKSProxyClient>> SOCKSProxyClient::connect(Socket& under
|
||||
auto reply = TRY(send_connect_request_message(underlying, version, target, target_port, command));
|
||||
if (reply != Reply::Succeeded) {
|
||||
underlying.close();
|
||||
return Error::from_string_literal(reply_response_name(reply));
|
||||
return Error::from_string_view(reply_response_name(reply));
|
||||
}
|
||||
|
||||
return adopt_nonnull_own_or_enomem(new SOCKSProxyClient {
|
||||
@@ -296,7 +296,7 @@ ErrorOr<NonnullOwnPtr<SOCKSProxyClient>> SOCKSProxyClient::connect(Socket& under
|
||||
auto reply = TRY(send_connect_request_message(underlying, version, target, target_port, command));
|
||||
if (reply != Reply::Succeeded) {
|
||||
underlying.close();
|
||||
return Error::from_string_literal(reply_response_name(reply));
|
||||
return Error::from_string_view(reply_response_name(reply));
|
||||
}
|
||||
|
||||
return adopt_nonnull_own_or_enomem(new SOCKSProxyClient {
|
||||
|
||||
Reference in New Issue
Block a user