From bb8a51011391bef49167bebcbc4539623cab3005 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Thu, 30 Aug 2012 13:22:31 -0700 Subject: [PATCH] Add an impl path::WindowsPath : Eq. --- src/libcore/path.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libcore/path.rs b/src/libcore/path.rs index 052e853e22e..7b1ac700097 100644 --- a/src/libcore/path.rs +++ b/src/libcore/path.rs @@ -71,6 +71,15 @@ impl PosixPath : Eq { } } +impl WindowsPath : Eq { + pure fn eq(&&other: WindowsPath) -> bool { + return self.host == other.host && + self.device == other.device && + self.is_absolute == other.is_absolute && + self.components == other.components; + } +} + // FIXME (#3227): when default methods in traits are working, de-duplicate // PosixPath and WindowsPath, most of their methods are common. impl PosixPath : GenericPath {