@@ -284,16 +284,15 @@ pub mod rewrites {
284
284
/// `cb(destination, source)` is called for each item, either with `Some(source)` if it's
285
285
/// the destination of a copy or rename, or with `None` for source if no relation to other
286
286
/// 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.
290
289
/// `push_source_tree(push_fn: push(change, location))` is a function that is called when the entire tree of the source
291
290
/// should be added as modifications by calling `push` repeatedly to use for perfect copy tracking. Note that
292
291
/// `push` will panic if `change` is not a modification, and it's valid to not call `push` at all.
293
292
pub fn emit < PushSourceTreeFn , E > (
294
293
& mut self ,
295
294
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 ,
297
296
mut push_source_tree : PushSourceTreeFn ,
298
297
) -> Result < Outcome , emit:: Error >
299
298
where
@@ -317,7 +316,7 @@ pub mod rewrites {
317
316
& mut cb,
318
317
self . rewrites . percentage ,
319
318
out,
320
- objects,
319
+ & objects,
321
320
) ?;
322
321
323
322
if let Some ( copies) = self . rewrites . copies {
@@ -326,7 +325,7 @@ pub mod rewrites {
326
325
& mut cb,
327
326
copies. percentage ,
328
327
out,
329
- objects,
328
+ & objects,
330
329
) ?;
331
330
332
331
match copies. source {
@@ -348,7 +347,7 @@ pub mod rewrites {
348
347
& mut cb,
349
348
copies. percentage ,
350
349
out,
351
- objects,
350
+ & objects,
352
351
) ?;
353
352
}
354
353
}
@@ -377,11 +376,11 @@ pub mod rewrites {
377
376
cb : & mut impl FnMut ( visit:: Destination < ' _ , T > , Option < visit:: Source < ' _ > > ) -> gix_diff:: tree:: visit:: Action ,
378
377
percentage : Option < f32 > ,
379
378
mut out : Outcome ,
380
- objects : & dyn gix_object:: Find ,
379
+ objects : impl gix_object:: Find ,
381
380
) -> Result < Outcome , emit:: Error > {
382
381
// we try to cheaply reduce the set of possibilities first, before possibly looking more exhaustively.
383
382
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) ?
385
384
== gix_diff:: tree:: visit:: Action :: Cancel
386
385
{
387
386
return Ok ( out) ;
@@ -403,7 +402,7 @@ pub mod rewrites {
403
402
false
404
403
} ;
405
404
if !is_limited {
406
- self . match_pairs ( cb, percentage, kind, & mut out, objects) ?;
405
+ self . match_pairs ( cb, percentage, kind, & mut out, & objects) ?;
407
406
}
408
407
}
409
408
Ok ( out)
@@ -415,7 +414,7 @@ pub mod rewrites {
415
414
percentage : Option < f32 > ,
416
415
kind : visit:: Kind ,
417
416
stats : & mut Outcome ,
418
- objects : & dyn gix_object:: Find ,
417
+ objects : impl gix_object:: Find ,
419
418
) -> Result < gix_diff:: tree:: visit:: Action , emit:: Error > {
420
419
// TODO(perf): reuse object data and interner state and interned tokens, make these available to `find_match()`
421
420
let mut dest_ofs = 0 ;
@@ -433,7 +432,7 @@ pub mod rewrites {
433
432
percentage. map ( |p| ( p, self . diff_algo ) ) ,
434
433
kind,
435
434
stats,
436
- objects,
435
+ & objects,
437
436
& mut self . buf1 ,
438
437
& mut self . buf2 ,
439
438
) ?
0 commit comments