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

AK: Port URL username/password from DeprecatedString to String

And for cases that just need to check whether the password/username is
empty, add a raw_{password,username} helper to avoid any allocation.
This commit is contained in:
Shannon Booth 2023-08-12 16:52:38 +12:00 committed by Andrew Kaster
parent 6b29dc3e46
commit 55a01e72ca
11 changed files with 44 additions and 39 deletions

View file

@ -175,10 +175,10 @@ Optional<AK::URL> strip_url_for_use_as_referrer(Optional<AK::URL> url, OriginOnl
return {};
// 3. Set urls username to the empty string.
url->set_username(""sv);
MUST(url->set_username(""sv));
// 4. Set urls password to the empty string.
url->set_password(""sv);
MUST(url->set_password(""sv));
// 5. Set urls fragment to null.
url->set_fragment({});