Skip to content

Commit 39de4e4

Browse files
authored
Rollup merge of #97943 - Warrenren:master, r=Dylan-DPC
line 1352, change `self` to `*self`, other to `*other` The current code will not results bug, but it difficult to understand. These code result to call &f32::partial_cmp(), and the performance will be lower than the changed code. I'm not sure why the current code don't use (*self) (*other), if you have some idea, please let me know.
2 parents 4b7ec84 + 9e1e476 commit 39de4e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/cmp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,7 @@ mod impls {
13491349
impl PartialOrd for $t {
13501350
#[inline]
13511351
fn partial_cmp(&self, other: &$t) -> Option<Ordering> {
1352-
match (self <= other, self >= other) {
1352+
match (*self <= *other, *self >= *other) {
13531353
(false, false) => None,
13541354
(false, true) => Some(Greater),
13551355
(true, false) => Some(Less),

0 commit comments

Comments
 (0)