From f96e85416e5cff1bdd200eb669c954a2fe2ed074 Mon Sep 17 00:00:00 2001 From: Erick Ahmed Date: Wed, 12 Nov 2025 15:43:48 +0100 Subject: [PATCH] ffi: add debug method --- src/wrappers/point.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/wrappers/point.rs b/src/wrappers/point.rs index 60b9bd5..9ecdbf6 100644 --- a/src/wrappers/point.rs +++ b/src/wrappers/point.rs @@ -54,6 +54,12 @@ mod ffi_point { } } - unsafe impl Send for Point {} - unsafe impl Sync for Point {} + // TODO: check if i can mark as thread-safe + + impl std::fmt::Debug for Point { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let (x, y, z) = self.coordinates(); + write!(f, "Point({}, {}, {})", x, y, z) + } + } }