Add #[cold] tags.
This commit is contained in:
@@ -9,7 +9,8 @@ use std::prelude::v1::*;
|
||||
#[cfg(not(feature = "no_float"))]
|
||||
use num_traits::Float;
|
||||
|
||||
#[inline]
|
||||
#[cold]
|
||||
#[inline(never)]
|
||||
pub fn make_err(msg: impl Into<String>) -> RhaiError {
|
||||
ERR::ErrorArithmetic(msg.into(), Position::NONE).into()
|
||||
}
|
||||
|
@@ -120,11 +120,9 @@ pub trait Package {
|
||||
///
|
||||
/// def_package! {
|
||||
/// /// My super-duper package.
|
||||
/// pub MyPackage(module @ 10) {
|
||||
/// pub MyPackage(module) {
|
||||
/// // Load a native Rust function.
|
||||
/// module.set_native_fn("my_add", add);
|
||||
/// } |> |engine| {
|
||||
/// engine.register_custom_operator("@", 160).unwrap();
|
||||
/// }
|
||||
/// }
|
||||
/// ```
|
||||
|
Reference in New Issue
Block a user