Add/remove #[inline] attributes.
This commit is contained in:
@@ -26,7 +26,6 @@ macro_rules! gen_functions {
|
||||
use super::super::*;
|
||||
|
||||
#[export_fn]
|
||||
#[inline(always)]
|
||||
pub fn to_string_func(x: &mut $arg_type) -> ImmutableString {
|
||||
super::super::$fn_name(x)
|
||||
}
|
||||
@@ -124,30 +123,24 @@ gen_functions!(print_array => to_debug(Array));
|
||||
|
||||
// Register print and debug
|
||||
#[export_fn]
|
||||
#[inline(always)]
|
||||
fn print_empty_string() -> ImmutableString {
|
||||
"".to_string().into()
|
||||
}
|
||||
#[export_fn]
|
||||
#[inline(always)]
|
||||
fn print_unit(_x: ()) -> ImmutableString {
|
||||
"".to_string().into()
|
||||
}
|
||||
#[export_fn]
|
||||
#[inline(always)]
|
||||
fn print_string(s: ImmutableString) -> ImmutableString {
|
||||
s
|
||||
}
|
||||
#[export_fn]
|
||||
#[inline(always)]
|
||||
fn debug_fn_ptr(f: &mut FnPtr) -> ImmutableString {
|
||||
to_string(f)
|
||||
}
|
||||
#[inline(always)]
|
||||
fn to_string<T: Display>(x: &mut T) -> ImmutableString {
|
||||
x.to_string().into()
|
||||
}
|
||||
#[inline]
|
||||
fn to_debug<T: Debug>(x: &mut T) -> ImmutableString {
|
||||
format!("{:?}", x).into()
|
||||
}
|
||||
@@ -155,7 +148,7 @@ fn to_debug<T: Debug>(x: &mut T) -> ImmutableString {
|
||||
#[cfg(not(feature = "no_object"))]
|
||||
mod format_map {
|
||||
use super::*;
|
||||
#[inline]
|
||||
|
||||
#[export_fn]
|
||||
pub fn format_map(x: &mut Map) -> ImmutableString {
|
||||
format!("#{:?}", x).into()
|
||||
|
Reference in New Issue
Block a user