From 680f333106e3c02cc178436ed9a7b0df921be4d6 Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Sat, 24 Feb 2024 22:42:23 +0530 Subject: [PATCH] fix: convert constant pointers to strings instead --- src/lune/util/formatting.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lune/util/formatting.rs b/src/lune/util/formatting.rs index 720dd7f..7181239 100644 --- a/src/lune/util/formatting.rs +++ b/src/lune/util/formatting.rs @@ -127,7 +127,7 @@ pub fn pretty_format_value( write!(buffer, "{}", STYLE_DIM.apply_to("{ ... }"))?; } else if let Some(s) = call_table_tostring_metamethod(tab) { write!(buffer, "{s}")?; - } else if depth >= 1 && parent_table_addr.eq(&Some(format!("{:p}", tab))) { + } else if depth >= 1 && parent_table_addr.eq(&Some(format!("{:p}", tab.to_pointer()))) { write!(buffer, "{}", STYLE_DIM.apply_to(""))? } else { let mut is_empty = false; @@ -194,7 +194,7 @@ pub fn pretty_format_multi_value(multi: &LuaMultiValue) -> LuaResult { if let LuaValue::String(s) = value { write!(buffer, "{}", s.to_string_lossy()).into_lua_err()?; } else { - pretty_format_value(&mut buffer, value, Some(format!("{:p}", value)), 0).into_lua_err()?; + pretty_format_value(&mut buffer, value, Some(format!("{:p}", value.to_pointer())), 0).into_lua_err()?; } if counter < multi.len() { write!(&mut buffer, " ").into_lua_err()?;