srctree

David Zero parent 4dcce399 3b857850
url: Fix bug in includes_credentials()

Instead of checking both user and password to determine if a URLincludes credentials, we were checking user twice.

inlinesplit
url/url.h added: 2, removed: 2, total 0
@@ -167,7 +167,7 @@ private:
bool starts_with_windows_drive_letter(std::string_view) const;
void shorten_url_path(Url &) const;
 
constexpr bool includes_credentials(Url &url) const { return !url.user.empty() || !url.user.empty(); }
constexpr bool includes_credentials(Url &url) const { return !url.user.empty() || !url.passwd.empty(); }
 
constexpr bool has_opaque_path(Url &url) const { return std::holds_alternative<std::string>(url.path); }