LibURL: Remove the implicit URL constructors

All URLs are now either constucted through the URL Parser or by
default constructing a URL, and setting each of the fields of that
URL manually. This makes it much more difficult to create invalid
URLs.
This commit is contained in:
Shannon Booth 2025-02-22 21:52:44 +13:00 committed by Tim Flynn
commit de89f5af6d
Notes: github-actions[bot] 2025-03-04 21:25:54 +00:00
2 changed files with 2 additions and 22 deletions

View file

@ -1,7 +1,7 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <andreas@ladybird.org>
* Copyright (c) 2021, Max Wipfli <mail@maxwipfli.ch>
* Copyright (c) 2023-2024, Shannon Booth <shannon@serenityos.org>
* Copyright (c) 2023-2025, Shannon Booth <shannon@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -77,15 +77,6 @@ class URL {
public:
URL() = default;
URL(StringView);
URL(ByteString const& string)
: URL(string.view())
{
}
URL(String const& string)
: URL(string.bytes_as_string_view())
{
}
bool is_valid() const { return m_data->valid; }