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

@@ -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
}