diff --git a/library/std/src/path.rs b/library/std/src/path.rs index ede147aca12..6ccf4c9656e 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -951,7 +951,7 @@ impl FusedIterator for Components<'_> {} impl<'a> cmp::PartialEq for Components<'a> { #[inline] fn eq(&self, other: &Components<'a>) -> bool { - Iterator::eq(self.clone(), other.clone()) + Iterator::eq(self.clone().rev(), other.clone().rev()) } }