mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
ParsedURL: Remove url field
This prevents a 'url' field that is out of sync with the other fields. You can use to_string() to get the full URL.
This commit is contained in:
parent
a0901e5588
commit
f705ce7f9a
8 changed files with 25 additions and 43 deletions
|
@ -40,7 +40,6 @@ ParsedURL parseURL(const std::string & url)
|
|||
path = "/";
|
||||
|
||||
return ParsedURL{
|
||||
.url = url,
|
||||
.base = base,
|
||||
.scheme = scheme,
|
||||
.authority = authority,
|
||||
|
@ -136,6 +135,12 @@ std::string ParsedURL::to_string() const
|
|||
+ (fragment.empty() ? "" : "#" + percentEncode(fragment));
|
||||
}
|
||||
|
||||
std::ostream & operator << (std::ostream & os, const ParsedURL & url)
|
||||
{
|
||||
os << url.to_string();
|
||||
return os;
|
||||
}
|
||||
|
||||
bool ParsedURL::operator ==(const ParsedURL & other) const noexcept
|
||||
{
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue