Add an impl path::WindowsPath : Eq.

This commit is contained in:
Graydon Hoare 2012-08-30 13:22:31 -07:00
parent 2d31c2afc4
commit bb8a510113
1 changed files with 9 additions and 0 deletions

View File

@ -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 {