We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a47ccad commit b4a1d85Copy full SHA for b4a1d85
src/components/global.rs
@@ -31,19 +31,15 @@ pub fn pprint(lua: &mlua::Lua) -> mlua::Result<()> {
31
lua.globals().set(
32
"astra_internal__pretty_print",
33
lua.create_function(|_, args: mlua::MultiValue| {
34
- let mut parts = Vec::new();
35
-
36
for input in args {
37
- let part = if let Some(s) = input.as_string() {
38
- s.to_string_lossy().to_string()
+ if let Some(s) = input.as_string() {
+ print!("{} ", s.to_string_lossy());
39
} else if input.is_userdata() {
40
- format!("{input:?}")
+ print!("{input:?} ")
41
} else {
42
- format!("{input:#?}")
+ print!("{input:#?} ")
43
};
44
- parts.push(part);
45
}
46
- println!("{}", parts.join("\t"));
47
48
Ok(())
49
})?,
0 commit comments