Add more range API's.
This commit is contained in:
@@ -542,10 +542,15 @@ mod range_functions {
|
||||
range.contains(&value)
|
||||
}
|
||||
#[rhai_fn(get = "is_inclusive", name = "is_inclusive", pure)]
|
||||
pub fn range_is_inclusive(range: &mut ExclusiveRange) -> bool {
|
||||
pub fn is_inclusive(range: &mut ExclusiveRange) -> bool {
|
||||
let _range = range;
|
||||
false
|
||||
}
|
||||
#[rhai_fn(get = "is_exclusive", name = "is_exclusive", pure)]
|
||||
pub fn is_exclusive(range: &mut ExclusiveRange) -> bool {
|
||||
let _range = range;
|
||||
true
|
||||
}
|
||||
#[rhai_fn(get = "is_empty", name = "is_empty", pure)]
|
||||
pub fn is_empty(range: &mut ExclusiveRange) -> bool {
|
||||
range.is_empty()
|
||||
@@ -571,4 +576,9 @@ mod range_functions {
|
||||
let _range = range;
|
||||
true
|
||||
}
|
||||
#[rhai_fn(get = "is_exclusive", name = "is_exclusive", pure)]
|
||||
pub fn is_exclusive_inclusive(range: &mut InclusiveRange) -> bool {
|
||||
let _range = range;
|
||||
false
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user