Skip to content

Commit

Permalink
fix! HipPath comparison
Browse files Browse the repository at this point in the history
following std::path::Path component-based comparison
  • Loading branch information
polazarus committed Jan 7, 2025
1 parent a89b08e commit 7b11ce6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/path/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ where
{
#[inline]
fn cmp(&self, other: &Self) -> core::cmp::Ordering {
self.as_os_str().cmp(other.as_os_str())
self.as_path().cmp(other.as_path())
}
}

impl<B1: Backend, B2: Backend> PartialOrd<HipPath<'_, B1>> for HipPath<'_, B2> {
#[inline]
fn partial_cmp(&self, other: &HipPath<'_, B1>) -> Option<core::cmp::Ordering> {
self.as_os_str().partial_cmp(other.as_os_str())
self.as_path().partial_cmp(other.as_path())
}
}

Expand Down

0 comments on commit 7b11ce6

Please sign in to comment.