--- a/rust/hg-core/src/revlog.rs Mon Jun 15 15:14:16 2020 -0400
+++ b/rust/hg-core/src/revlog.rs Mon Jun 15 18:26:40 2020 +0200
@@ -25,6 +25,7 @@
///
/// This is also equal to `i32::max_value()`, but it's better to spell
/// it out explicitely, same as in `mercurial.node`
+#[allow(clippy::unreadable_literal)]
pub const WORKING_DIRECTORY_REVISION: Revision = 0x7fffffff;
/// The simplest expression of what we need of Mercurial DAGs.
@@ -49,6 +50,10 @@
/// Total number of Revisions referenced in this index
fn len(&self) -> usize;
+ fn is_empty(&self) -> bool {
+ self.len() == 0
+ }
+
/// Return a reference to the Node or `None` if rev is out of bounds
///
/// `NULL_REVISION` is not considered to be out of bounds.