mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-10 05:53:10 +00:00
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.
This commit is contained in:
commit
39de4e4b6f
@ -1349,7 +1349,7 @@ mod impls {
|
||||
impl PartialOrd for $t {
|
||||
#[inline]
|
||||
fn partial_cmp(&self, other: &$t) -> Option<Ordering> {
|
||||
match (self <= other, self >= other) {
|
||||
match (*self <= *other, *self >= *other) {
|
||||
(false, false) => None,
|
||||
(false, true) => Some(Greater),
|
||||
(true, false) => Some(Less),
|
||||
|
Loading…
Reference in New Issue
Block a user