diff --git a/Userland/Libraries/LibManual/Node.h b/Userland/Libraries/LibManual/Node.h index fd45fe8302..c96fafbddf 100644 --- a/Userland/Libraries/LibManual/Node.h +++ b/Userland/Libraries/LibManual/Node.h @@ -38,6 +38,24 @@ public: // Finds a page via the help://man///page URLs. // This will automatically start discovering pages by inspecting the filesystem. static ErrorOr> try_find_from_help_url(URL const&); + + bool operator==(Node const& other) const + { + if (auto this_path = this->path(), other_path = other.path(); + !this_path.is_error() && !other_path.is_error()) { + return this_path.release_value() == other_path.release_value(); + } + return false; + } +}; + +} + +namespace AK { + +template +requires(IsBaseOf) struct Traits : public GenericTraits { + static unsigned hash(T p) { return Traits::hash(p.path()); } }; }