Refine is_empty methods.
This commit is contained in:
@@ -140,7 +140,7 @@ pub mod blob_functions {
|
||||
pub fn len(blob: &mut Blob) -> INT {
|
||||
blob.len() as INT
|
||||
}
|
||||
/// Return true if the blob is empty.
|
||||
/// Return true if the BLOB is empty.
|
||||
#[rhai_fn(name = "is_empty", get = "is_empty", pure)]
|
||||
pub fn is_empty(blob: &mut Blob) -> bool {
|
||||
blob.len() == 0
|
||||
|
@@ -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()
|
||||
|
@@ -26,7 +26,7 @@ mod map_functions {
|
||||
map.len() as INT
|
||||
}
|
||||
/// Return true if the map is empty.
|
||||
#[rhai_fn(name = "is_empty", get = "is_empty", pure)]
|
||||
#[rhai_fn(pure)]
|
||||
pub fn is_empty(map: &mut Map) -> bool {
|
||||
map.len() == 0
|
||||
}
|
||||
|
Reference in New Issue
Block a user