Add/remove #[inline] attributes.

This commit is contained in:
Stephen Chung
2020-10-08 22:25:50 +08:00
parent e34a370f33
commit 1272eeb81a
31 changed files with 328 additions and 114 deletions

View File

@@ -26,7 +26,6 @@ def_package!(crate:BasicTimePackage:"Basic timing utilities.", lib, {
#[export_module]
mod time_functions {
#[inline(always)]
pub fn timestamp() -> Instant {
Instant::now()
}
@@ -212,32 +211,26 @@ mod time_functions {
}
#[rhai_fn(name = "==")]
#[inline(always)]
pub fn eq(x: Instant, y: Instant) -> bool {
x == y
}
#[rhai_fn(name = "!=")]
#[inline(always)]
pub fn ne(x: Instant, y: Instant) -> bool {
x != y
}
#[rhai_fn(name = "<")]
#[inline(always)]
pub fn lt(x: Instant, y: Instant) -> bool {
x < y
}
#[rhai_fn(name = "<=")]
#[inline(always)]
pub fn lte(x: Instant, y: Instant) -> bool {
x <= y
}
#[rhai_fn(name = ">")]
#[inline(always)]
pub fn gt(x: Instant, y: Instant) -> bool {
x > y
}
#[rhai_fn(name = ">=")]
#[inline(always)]
pub fn gte(x: Instant, y: Instant) -> bool {
x >= y
}