diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
commit | 9835e2ae736235810b4ea1c162ca5e65c547e770 (patch) | |
tree | 3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/gix/src/id.rs | |
parent | Releasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff) | |
download | rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip |
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/gix/src/id.rs')
-rw-r--r-- | vendor/gix/src/id.rs | 12 |
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}" ) } } |