diff --git a/src/libutil/include/nix/util/url.hh b/src/libutil/include/nix/util/url.hh index 8980b4ce3..e29226720 100644 --- a/src/libutil/include/nix/util/url.hh +++ b/src/libutil/include/nix/util/url.hh @@ -15,7 +15,7 @@ struct ParsedURL std::string to_string() const; - bool operator==(const ParsedURL & other) const noexcept; + bool operator==(const ParsedURL & other) const noexcept = default; /** * Remove `.` and `..` path elements. diff --git a/src/libutil/url.cc b/src/libutil/url.cc index 67043285c..7f31d0f1c 100644 --- a/src/libutil/url.cc +++ b/src/libutil/url.cc @@ -110,12 +110,6 @@ std::ostream & operator<<(std::ostream & os, const ParsedURL & url) return os; } -bool ParsedURL::operator==(const ParsedURL & other) const noexcept -{ - return scheme == other.scheme && authority == other.authority && path == other.path && query == other.query - && fragment == other.fragment; -} - ParsedURL ParsedURL::canonicalise() { ParsedURL res(*this);