Add FnPtr to standard packages.

This commit is contained in:
Stephen Chung
2020-08-03 23:11:08 +08:00
parent 3fc35c4f87
commit e1a70fe958
3 changed files with 8 additions and 6 deletions

View File

@@ -21,7 +21,7 @@ fn to_debug<T: Debug>(x: &mut T) -> FuncReturn<ImmutableString> {
Ok(format!("{:?}", x).into())
}
fn to_string<T: Display>(x: &mut T) -> FuncReturn<ImmutableString> {
Ok(format!("{}", x).into())
Ok(x.to_string().into())
}
#[cfg(not(feature = "no_object"))]
fn format_map(x: &mut Map) -> FuncReturn<ImmutableString> {