Move range contains into builtin.

This commit is contained in:
Stephen Chung
2021-12-18 14:50:37 +08:00
parent fc84600b22
commit 2b79a65454
2 changed files with 22 additions and 14 deletions

View File

@@ -537,10 +537,6 @@ mod range_functions {
pub fn end(range: &mut ExclusiveRange) -> INT {
range.end
}
#[rhai_fn(name = "contains", pure)]
pub fn contains(range: &mut ExclusiveRange, value: INT) -> bool {
range.contains(&value)
}
#[rhai_fn(get = "is_inclusive", name = "is_inclusive", pure)]
pub fn is_inclusive(range: &mut ExclusiveRange) -> bool {
let _range = range;
@@ -559,10 +555,6 @@ mod range_functions {
pub fn end_inclusive(range: &mut InclusiveRange) -> INT {
*range.end()
}
#[rhai_fn(name = "contains", pure)]
pub fn contains_inclusive(range: &mut InclusiveRange, value: INT) -> bool {
range.contains(&value)
}
#[rhai_fn(get = "is_inclusive", name = "is_inclusive", pure)]
pub fn is_inclusive_inclusive(range: &mut InclusiveRange) -> bool {
let _range = range;