@@ -284,16 +284,15 @@ pub mod rewrites {
284284 /// `cb(destination, source)` is called for each item, either with `Some(source)` if it's
285285 /// the destination of a copy or rename, or with `None` for source if no relation to other
286286 /// items in the tracked set exist.
287- /// `find_blob(oid, buf) -> Result<BlobRef, E>` is used to access blob data for similarity checks
288- /// if required with data and is taken directly from the object database. Worktree filters and diff conversions
289- /// will be applied afterwards automatically.
287+ /// `objects` is used to access blob data for similarity checks if required and is taken directly from the object database.
288+ /// Worktree filters and diff conversions will be applied afterwards automatically.
290289 /// `push_source_tree(push_fn: push(change, location))` is a function that is called when the entire tree of the source
291290 /// should be added as modifications by calling `push` repeatedly to use for perfect copy tracking. Note that
292291 /// `push` will panic if `change` is not a modification, and it's valid to not call `push` at all.
293292 pub fn emit < PushSourceTreeFn , E > (
294293 & mut self ,
295294 mut cb : impl FnMut ( visit:: Destination < ' _ , T > , Option < visit:: Source < ' _ > > ) -> gix_diff:: tree:: visit:: Action ,
296- objects : & dyn gix_object:: Find ,
295+ objects : impl gix_object:: Find ,
297296 mut push_source_tree : PushSourceTreeFn ,
298297 ) -> Result < Outcome , emit:: Error >
299298 where
@@ -317,7 +316,7 @@ pub mod rewrites {
317316 & mut cb,
318317 self . rewrites . percentage ,
319318 out,
320- objects,
319+ & objects,
321320 ) ?;
322321
323322 if let Some ( copies) = self . rewrites . copies {
@@ -326,7 +325,7 @@ pub mod rewrites {
326325 & mut cb,
327326 copies. percentage ,
328327 out,
329- objects,
328+ & objects,
330329 ) ?;
331330
332331 match copies. source {
@@ -348,7 +347,7 @@ pub mod rewrites {
348347 & mut cb,
349348 copies. percentage ,
350349 out,
351- objects,
350+ & objects,
352351 ) ?;
353352 }
354353 }
@@ -377,11 +376,11 @@ pub mod rewrites {
377376 cb : & mut impl FnMut ( visit:: Destination < ' _ , T > , Option < visit:: Source < ' _ > > ) -> gix_diff:: tree:: visit:: Action ,
378377 percentage : Option < f32 > ,
379378 mut out : Outcome ,
380- objects : & dyn gix_object:: Find ,
379+ objects : impl gix_object:: Find ,
381380 ) -> Result < Outcome , emit:: Error > {
382381 // we try to cheaply reduce the set of possibilities first, before possibly looking more exhaustively.
383382 let needs_second_pass = !needs_exact_match ( percentage) ;
384- if self . match_pairs ( cb, None /* by identity */ , kind, & mut out, objects) ?
383+ if self . match_pairs ( cb, None /* by identity */ , kind, & mut out, & objects) ?
385384 == gix_diff:: tree:: visit:: Action :: Cancel
386385 {
387386 return Ok ( out) ;
@@ -403,7 +402,7 @@ pub mod rewrites {
403402 false
404403 } ;
405404 if !is_limited {
406- self . match_pairs ( cb, percentage, kind, & mut out, objects) ?;
405+ self . match_pairs ( cb, percentage, kind, & mut out, & objects) ?;
407406 }
408407 }
409408 Ok ( out)
@@ -415,7 +414,7 @@ pub mod rewrites {
415414 percentage : Option < f32 > ,
416415 kind : visit:: Kind ,
417416 stats : & mut Outcome ,
418- objects : & dyn gix_object:: Find ,
417+ objects : impl gix_object:: Find ,
419418 ) -> Result < gix_diff:: tree:: visit:: Action , emit:: Error > {
420419 // TODO(perf): reuse object data and interner state and interned tokens, make these available to `find_match()`
421420 let mut dest_ofs = 0 ;
@@ -433,7 +432,7 @@ pub mod rewrites {
433432 percentage. map ( |p| ( p, self . diff_algo ) ) ,
434433 kind,
435434 stats,
436- objects,
435+ & objects,
437436 & mut self . buf1 ,
438437 & mut self . buf2 ,
439438 ) ?
0 commit comments