diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2012-08-30 13:22:31 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2012-08-30 13:22:31 -0700 |
| commit | bb8a51011391bef49167bebcbc4539623cab3005 (patch) | |
| tree | 9550e32e7b0bff34fc5871cec3d7980f5a5b839c /src/libcore/path.rs | |
| parent | 2d31c2afc4d029a50c50960bdafc8f56e3bc34c7 (diff) | |
| download | rust-bb8a51011391bef49167bebcbc4539623cab3005.tar.gz rust-bb8a51011391bef49167bebcbc4539623cab3005.zip | |
Add an impl path::WindowsPath : Eq.
Diffstat (limited to 'src/libcore/path.rs')
| -rw-r--r-- | src/libcore/path.rs | 9 |
1 files changed, 9 insertions, 0 deletions
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 { |
