From aeb920c2ba8854edf4450d8f799135e8bb122ec4 Mon Sep 17 00:00:00 2001 From: Vitaly Bogdanov Date: Thu, 14 Sep 2023 09:55:25 +0300 Subject: [PATCH 1/2] Display pointer to GroundingSpace to distinguish different spaces --- lib/src/space/grounding.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/space/grounding.rs b/lib/src/space/grounding.rs index a129dac0c..d18126ac9 100644 --- a/lib/src/space/grounding.rs +++ b/lib/src/space/grounding.rs @@ -330,13 +330,13 @@ impl PartialEq for GroundingSpace { impl Debug for GroundingSpace { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "GroundingSpace") + write!(f, "GroundingSpace-{:?}", self as *const GroundingSpace) } } impl Display for GroundingSpace { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "GroundingSpace") + write!(f, "GroundingSpace-{:?}", self as *const GroundingSpace) } } From 1fb6ee8d69d90894a15e80f1e8ae5b0fdd58bcbc Mon Sep 17 00:00:00 2001 From: Vitaly Bogdanov Date: Fri, 15 Sep 2023 14:09:09 +0300 Subject: [PATCH 2/2] Use pointer fmt markup --- lib/src/space/grounding.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/space/grounding.rs b/lib/src/space/grounding.rs index d18126ac9..51970a524 100644 --- a/lib/src/space/grounding.rs +++ b/lib/src/space/grounding.rs @@ -330,13 +330,13 @@ impl PartialEq for GroundingSpace { impl Debug for GroundingSpace { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "GroundingSpace-{:?}", self as *const GroundingSpace) + write!(f, "GroundingSpace-{self:p}") } } impl Display for GroundingSpace { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "GroundingSpace-{:?}", self as *const GroundingSpace) + write!(f, "GroundingSpace-{self:p}") } }