From d8c511708b578640f853e63e58f6f09610325f1d Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 10 Feb 2025 20:52:45 +0100 Subject: [PATCH] Prepare for follow-on change I'm about to make a change that adds metadata to these pointers. Comparing them with that metadata included leads to a warning, and that warning is what this change avoids. --- experiments/2024-12-09/src/geometry/operation.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/experiments/2024-12-09/src/geometry/operation.rs b/experiments/2024-12-09/src/geometry/operation.rs index 75de88554..4a3b47c0c 100644 --- a/experiments/2024-12-09/src/geometry/operation.rs +++ b/experiments/2024-12-09/src/geometry/operation.rs @@ -75,7 +75,9 @@ impl Eq for Handle {} impl Ord for Handle { fn cmp(&self, other: &Self) -> Ordering { - Rc::as_ptr(&self.inner).cmp(&Rc::as_ptr(&other.inner)) + Rc::as_ptr(&self.inner) + .cast::<()>() + .cmp(&Rc::as_ptr(&other.inner).cast::<()>()) } }