Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/real/arithmetic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1161,8 +1161,8 @@ impl Real {
/// If refinement cannot decide the order at the standard partial-order
/// precision, this keeps `self`, matching the conservative behavior of
/// [`PartialOrd`] callers that treat incomparability as no improvement.
pub fn min(self, other: Real) -> Real {
match self.partial_cmp(&other) {
pub fn min<'r>(&'r self, other: &'r Real) -> &'r Real {
match self.partial_cmp(other) {
Some(Ordering::Greater) => other,
_ => self,
}
Expand All @@ -1173,8 +1173,8 @@ impl Real {
/// If refinement cannot decide the order at the standard partial-order
/// precision, this keeps `self`, matching the conservative behavior of
/// [`PartialOrd`] callers that treat incomparability as no improvement.
pub fn max(self, other: Real) -> Real {
match self.partial_cmp(&other) {
pub fn max<'r>(&'r self, other: &'r Real) -> &'r Real {
match self.partial_cmp(other) {
Some(Ordering::Less) => other,
_ => self,
}
Expand Down
Loading