mirror of
https://github.com/lune-org/lune.git
synced 2025-04-20 03:43:49 +01:00
fix: convert constant pointers to strings instead
This commit is contained in:
parent
9a3421dcf9
commit
680f333106
1 changed files with 2 additions and 2 deletions
|
@ -127,7 +127,7 @@ pub fn pretty_format_value(
|
||||||
write!(buffer, "{}", STYLE_DIM.apply_to("{ ... }"))?;
|
write!(buffer, "{}", STYLE_DIM.apply_to("{ ... }"))?;
|
||||||
} else if let Some(s) = call_table_tostring_metamethod(tab) {
|
} else if let Some(s) = call_table_tostring_metamethod(tab) {
|
||||||
write!(buffer, "{s}")?;
|
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("<self>"))?
|
write!(buffer, "{}", STYLE_DIM.apply_to("<self>"))?
|
||||||
} else {
|
} else {
|
||||||
let mut is_empty = false;
|
let mut is_empty = false;
|
||||||
|
@ -194,7 +194,7 @@ pub fn pretty_format_multi_value(multi: &LuaMultiValue) -> LuaResult<String> {
|
||||||
if let LuaValue::String(s) = value {
|
if let LuaValue::String(s) = value {
|
||||||
write!(buffer, "{}", s.to_string_lossy()).into_lua_err()?;
|
write!(buffer, "{}", s.to_string_lossy()).into_lua_err()?;
|
||||||
} else {
|
} 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() {
|
if counter < multi.len() {
|
||||||
write!(&mut buffer, " ").into_lua_err()?;
|
write!(&mut buffer, " ").into_lua_err()?;
|
||||||
|
|
Loading…
Add table
Reference in a new issue