Refine is_empty methods.

This commit is contained in:
Stephen Chung
2022-08-24 21:58:08 +08:00
parent ae5e88928e
commit ca1b7f6a39
7 changed files with 101 additions and 35 deletions

View File

@@ -666,7 +666,7 @@ mod range_functions {
let _ = range;
true
}
/// Returns true if the range contains no items.
/// Return true if the range contains no items.
#[rhai_fn(get = "is_empty", name = "is_empty", pure)]
pub fn is_empty_exclusive(range: &mut ExclusiveRange) -> bool {
range.is_empty()
@@ -693,7 +693,7 @@ mod range_functions {
let _ = range;
false
}
/// Returns true if the range contains no items.
/// Return true if the range contains no items.
#[rhai_fn(get = "is_empty", name = "is_empty", pure)]
pub fn is_empty_inclusive(range: &mut InclusiveRange) -> bool {
range.is_empty()