# HG changeset patch # User Raphaël Gomès # Date 1673285273 -3600 # Node ID 547d6817e0c32e60cae0a458baad25526fb68c76 # Parent b6dc4802e7efdbae7a259f1865d2731481897b1e rust-clippy: add `is_empty` method to please the `clippy` gods I can see it being useful anyway. diff -r b6dc4802e7ef -r 547d6817e0c3 rust/hg-core/src/dirstate_tree/dirstate_map.rs --- 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,