Skip to content

Commit d03aba3

Browse files
committed
Touch up PR 328
1 parent 238757d commit d03aba3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/identifier.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ impl Identifier {
200200
unsafe { ptr_as_str(&self.head) }
201201
}
202202
}
203+
204+
pub(crate) fn ptr_eq(&self, rhs: &Self) -> bool {
205+
self.head == rhs.head && self.tail == rhs.tail
206+
}
203207
}
204208

205209
impl Clone for Identifier {
@@ -257,12 +261,6 @@ impl Drop for Identifier {
257261
}
258262
}
259263

260-
impl Identifier {
261-
pub(crate) fn ptr_eq(&self, rhs: &Self) -> bool {
262-
self.head == rhs.head && self.tail == rhs.tail
263-
}
264-
}
265-
266264
impl PartialEq for Identifier {
267265
fn eq(&self, rhs: &Self) -> bool {
268266
if self.ptr_eq(rhs) {

src/impls.rs

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ impl Ord for Prerelease {
5353
if self.identifier.ptr_eq(&rhs.identifier) {
5454
return Ordering::Equal;
5555
}
56+
5657
match self.is_empty() {
5758
// A real release compares greater than prerelease.
5859
true => return Ordering::Greater,
@@ -110,6 +111,7 @@ impl Ord for BuildMetadata {
110111
if self.identifier.ptr_eq(&rhs.identifier) {
111112
return Ordering::Equal;
112113
}
114+
113115
let lhs = self.as_str().split('.');
114116
let mut rhs = rhs.as_str().split('.');
115117

0 commit comments

Comments
 (0)