# HG changeset patch # User Raphaël Gomès # Date 2023-01-09 17:27:53 # Node ID 547d6817e0c32e60cae0a458baad25526fb68c76 # Parent b6dc4802e7efdbae7a259f1865d2731481897b1e rust-clippy: add `is_empty` method to please the `clippy` gods I can see it being useful anyway. diff --git a/rust/hg-core/src/dirstate_tree/dirstate_map.rs b/rust/hg-core/src/dirstate_tree/dirstate_map.rs --- a/rust/hg-core/src/dirstate_tree/dirstate_map.rs +++ b/rust/hg-core/src/dirstate_tree/dirstate_map.rs @@ -1380,6 +1380,10 @@ impl OwningDirstateMap { map.nodes_with_entry_count as usize } + pub fn is_empty(&self) -> bool { + self.len() == 0 + } + pub fn contains_key( &self, key: &HgPath,