summaryrefslogtreecommitdiffstats
path: root/vendor/gix/src/id.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gix/src/id.rs')
-rw-r--r--vendor/gix/src/id.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/vendor/gix/src/id.rs b/vendor/gix/src/id.rs
index c57565fb5..72f424334 100644
--- a/vendor/gix/src/id.rs
+++ b/vendor/gix/src/id.rs
@@ -90,9 +90,6 @@ impl<'repo> Id<'repo> {
impl<'repo> Id<'repo> {
/// Obtain a platform for traversing ancestors of this commit.
///
- /// Note that unless [`error_on_missing_commit()`][revision::Walk::error_on_missing_commit()] is enabled, which be default it is not,
- /// one will always see an empty iteration even if this id is not a commit, instead of an error.
- /// If this is undesirable, it's best to check for the correct object type before creating an iterator.
pub fn ancestors(&self) -> revision::walk::Platform<'repo> {
revision::walk::Platform::new(Some(self.inner), self.repo)
}
@@ -186,10 +183,11 @@ mod tests {
#[test]
fn size_of_oid() {
- assert_eq!(
- std::mem::size_of::<Id<'_>>(),
- 32,
- "size of oid shouldn't change without notice"
+ let actual = std::mem::size_of::<Id<'_>>();
+ let ceiling = 32;
+ assert!(
+ actual <= ceiling,
+ "size of oid shouldn't change without notice: {actual} <= {ceiling}"
)
}
}