fix<doc>: rename _unit for unit

This commit is contained in:
Mathieu Lala 2023-02-09 19:03:02 +01:00
parent 9bdf3c290d
commit 8e5b280d8a
No known key found for this signature in database
GPG Key ID: C5D308ABEB84866F

View File

@ -140,13 +140,15 @@ mod print_debug_functions {
} }
/// Return the empty string. /// Return the empty string.
#[allow(unused_variables)]
#[rhai_fn(name = "print", name = "to_string")] #[rhai_fn(name = "print", name = "to_string")]
pub fn print_unit(ctx: NativeCallContext, _unit: ()) -> ImmutableString { pub fn print_unit(ctx: NativeCallContext, unit: ()) -> ImmutableString {
ctx.engine().const_empty_string() ctx.engine().const_empty_string()
} }
/// Convert the unit into a string in debug format. /// Convert the unit into a string in debug format.
#[allow(unused_variables)]
#[rhai_fn(name = "debug", name = "to_debug")] #[rhai_fn(name = "debug", name = "to_debug")]
pub fn debug_unit(_unit: ()) -> ImmutableString { pub fn debug_unit(unit: ()) -> ImmutableString {
"()".into() "()".into()
} }