changeset 49996:547d6817e0c3

rust-clippy: add `is_empty` method to please the `clippy` gods I can see it being useful anyway.
author Raphaël Gomès <rgomes@octobus.net>
date Mon, 09 Jan 2023 18:27:53 +0100
parents b6dc4802e7ef
children 66ffe3749a48
files rust/hg-core/src/dirstate_tree/dirstate_map.rs
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate_tree/dirstate_map.rs	Mon Jan 09 18:25:24 2023 +0100
+++ b/rust/hg-core/src/dirstate_tree/dirstate_map.rs	Mon Jan 09 18:27:53 2023 +0100
@@ -1380,6 +1380,10 @@
         map.nodes_with_entry_count as usize
     }
 
+    pub fn is_empty(&self) -> bool {
+        self.len() == 0
+    }
+
     pub fn contains_key(
         &self,
         key: &HgPath,