Skip to content

Commit bb8a510

Browse files
committed
Add an impl path::WindowsPath : Eq.
1 parent 2d31c2a commit bb8a510

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/libcore/path.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ impl PosixPath : Eq {
7171
}
7272
}
7373

74+
impl WindowsPath : Eq {
75+
pure fn eq(&&other: WindowsPath) -> bool {
76+
return self.host == other.host &&
77+
self.device == other.device &&
78+
self.is_absolute == other.is_absolute &&
79+
self.components == other.components;
80+
}
81+
}
82+
7483
// FIXME (#3227): when default methods in traits are working, de-duplicate
7584
// PosixPath and WindowsPath, most of their methods are common.
7685
impl PosixPath : GenericPath {

0 commit comments

Comments
 (0)