@@ -125,17 +125,18 @@ pub mod ancestors {
125
125
}
126
126
127
127
/// Return an iterator to traverse all commits in the history of the commit the parent [Id] is pointing to.
128
- pub fn all ( & mut self ) -> Iter < ' _ , ' repo > {
128
+ pub fn all ( & mut self ) -> Iter < ' repo > {
129
129
let tips = std:: mem:: replace ( & mut self . tips , Box :: new ( None . into_iter ( ) ) ) ;
130
130
let parents = self . parents ;
131
131
let sorting = self . sorting ;
132
+ let repo = self . repo ;
132
133
Iter {
133
- repo : self . repo ,
134
+ repo,
134
135
inner : Box :: new (
135
136
git_traverse:: commit:: Ancestors :: new (
136
137
tips,
137
138
git_traverse:: commit:: ancestors:: State :: default ( ) ,
138
- move |oid, buf| self . repo . objects . find_commit_iter ( oid, buf) ,
139
+ move |oid, buf| repo. objects . find_commit_iter ( oid, buf) ,
139
140
)
140
141
. sorting ( sorting)
141
142
. parents ( parents) ,
@@ -145,12 +146,12 @@ pub mod ancestors {
145
146
}
146
147
147
148
/// The iterator returned by [`Ancestors::all()`].
148
- pub struct Iter < ' a , ' repo > {
149
+ pub struct Iter < ' repo > {
149
150
repo : & ' repo crate :: Repository ,
150
- inner : Box < dyn Iterator < Item = Result < git_hash:: ObjectId , git_traverse:: commit:: ancestors:: Error > > + ' a > ,
151
+ inner : Box < dyn Iterator < Item = Result < git_hash:: ObjectId , git_traverse:: commit:: ancestors:: Error > > + ' repo > ,
151
152
}
152
153
153
- impl < ' a , ' repo > Iterator for Iter < ' a , ' repo > {
154
+ impl < ' repo > Iterator for Iter < ' repo > {
154
155
type Item = Result < Id < ' repo > , git_traverse:: commit:: ancestors:: Error > ;
155
156
156
157
fn next ( & mut self ) -> Option < Self :: Item > {
0 commit comments