diff options
Diffstat (limited to 'vendor/gix/src/ext')
-rw-r--r-- | vendor/gix/src/ext/object_id.rs | 10 | ||||
-rw-r--r-- | vendor/gix/src/ext/rev_spec.rs | 1 | ||||
-rw-r--r-- | vendor/gix/src/ext/tree.rs | 11 |
3 files changed, 10 insertions, 12 deletions
diff --git a/vendor/gix/src/ext/object_id.rs b/vendor/gix/src/ext/object_id.rs index a4515022b..d4d946766 100644 --- a/vendor/gix/src/ext/object_id.rs +++ b/vendor/gix/src/ext/object_id.rs @@ -8,10 +8,9 @@ pub type AncestorsIter<Find> = Ancestors<Find, fn(&gix_hash::oid) -> bool, ances /// An extension trait to add functionality to [`ObjectId`]s. pub trait ObjectIdExt: Sealed { /// Create an iterator over the ancestry of the commits reachable from this id, which must be a commit. - fn ancestors<Find, E>(self, find: Find) -> AncestorsIter<Find> + fn ancestors<Find>(self, find: Find) -> AncestorsIter<Find> where - Find: for<'a> FnMut(&gix_hash::oid, &'a mut Vec<u8>) -> Result<gix_object::CommitRefIter<'a>, E>, - E: std::error::Error + Send + Sync + 'static; + Find: gix_object::Find; /// Infuse this object id `repo` access. fn attach(self, repo: &crate::Repository) -> crate::Id<'_>; @@ -20,10 +19,9 @@ pub trait ObjectIdExt: Sealed { impl Sealed for ObjectId {} impl ObjectIdExt for ObjectId { - fn ancestors<Find, E>(self, find: Find) -> AncestorsIter<Find> + fn ancestors<Find>(self, find: Find) -> AncestorsIter<Find> where - Find: for<'a> FnMut(&gix_hash::oid, &'a mut Vec<u8>) -> Result<gix_object::CommitRefIter<'a>, E>, - E: std::error::Error + Send + Sync + 'static, + Find: gix_object::Find, { Ancestors::new(Some(self), ancestors::State::default(), find) } diff --git a/vendor/gix/src/ext/rev_spec.rs b/vendor/gix/src/ext/rev_spec.rs index ed7dc0460..caa58e2c7 100644 --- a/vendor/gix/src/ext/rev_spec.rs +++ b/vendor/gix/src/ext/rev_spec.rs @@ -12,6 +12,7 @@ impl RevSpecExt for gix_revision::Spec { fn attach(self, repo: &crate::Repository) -> crate::revision::Spec<'_> { crate::revision::Spec { inner: self, + path: None, first_ref: None, second_ref: None, repo, diff --git a/vendor/gix/src/ext/tree.rs b/vendor/gix/src/ext/tree.rs index 56b832b84..9aacc9d58 100644 --- a/vendor/gix/src/ext/tree.rs +++ b/vendor/gix/src/ext/tree.rs @@ -1,6 +1,5 @@ use std::borrow::BorrowMut; -use gix_hash::oid; use gix_object::TreeRefIter; use gix_traverse::tree::breadthfirst; @@ -16,11 +15,11 @@ pub trait TreeIterExt: Sealed { fn traverse<StateMut, Find, V>( &self, state: StateMut, - find: Find, + objects: Find, delegate: &mut V, ) -> Result<(), breadthfirst::Error> where - Find: for<'a> FnMut(&oid, &'a mut Vec<u8>) -> Option<TreeRefIter<'a>>, + Find: gix_object::Find, StateMut: BorrowMut<breadthfirst::State>, V: gix_traverse::tree::Visit; } @@ -31,15 +30,15 @@ impl<'d> TreeIterExt for TreeRefIter<'d> { fn traverse<StateMut, Find, V>( &self, state: StateMut, - find: Find, + objects: Find, delegate: &mut V, ) -> Result<(), breadthfirst::Error> where - Find: for<'a> FnMut(&oid, &'a mut Vec<u8>) -> Option<TreeRefIter<'a>>, + Find: gix_object::Find, StateMut: BorrowMut<breadthfirst::State>, V: gix_traverse::tree::Visit, { - breadthfirst(self.clone(), state, find, delegate) + breadthfirst(*self, state, objects, delegate) } } |