File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -399,7 +399,7 @@ fn tree_diff_at_file_path(
399399 }
400400
401401 fn visit ( & mut self , change : gix_diff:: tree:: visit:: Change ) -> gix_diff:: tree:: visit:: Action {
402- use gix_diff:: tree:: visit:: Action :: * ;
402+ use gix_diff:: tree:: visit;
403403 use gix_diff:: tree:: visit:: Change :: * ;
404404
405405 if self . inner . path ( ) == self . interesting_path {
@@ -438,11 +438,9 @@ fn tree_diff_at_file_path(
438438 } ,
439439 } ) ;
440440
441- // When we return `Cancel`, `gix_diff::tree` will convert this `Cancel` into an
442- // `Err(...)`. Keep this in mind when using `FindChangeToPath`.
443- Cancel
441+ visit:: Action :: Cancel
444442 } else {
445- Continue
443+ visit :: Action :: Continue
446444 }
447445 }
448446 }
@@ -452,9 +450,6 @@ fn tree_diff_at_file_path(
452450 stats. trees_diffed += 1 ;
453451
454452 match result {
455- // `recorder` cancels the traversal by returning `Cancel` when a change to `file_path` is
456- // found. `gix_diff::tree` converts `Cancel` into `Err(Cancelled)` which is why we match on
457- // `Err(Cancelled)` in addition to `Ok`.
458453 Ok ( _) | Err ( gix_diff:: tree:: Error :: Cancelled ) => Ok ( recorder. change ) ,
459454 Err ( error) => Err ( Error :: DiffTree ( error) ) ,
460455 }
You can’t perform that action at this time.
0 commit comments