Clean up clippy.

This commit is contained in:
Stephen Chung
2022-07-27 16:04:24 +08:00
parent 21f822020f
commit 39dee556c4
36 changed files with 271 additions and 369 deletions

View File

@@ -93,7 +93,7 @@ mod map_functions {
/// ```
pub fn remove(map: &mut Map, property: &str) -> Dynamic {
if !map.is_empty() {
map.remove(property).unwrap_or_else(|| Dynamic::UNIT)
map.remove(property).unwrap_or(Dynamic::UNIT)
} else {
Dynamic::UNIT
}