File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -346,11 +346,6 @@ pub fn get_diff(
346346 stage : bool ,
347347 options : Option < DiffOptions > ,
348348) -> Result < FileDiff > {
349- // TODO:
350- // Maybe move this `use` statement` closer to where it is being used by extracting the relevant
351- // code into a function.
352- use gix:: diff:: blob:: platform:: prepare_diff:: Operation ;
353-
354349 scope_time ! ( "get_diff" ) ;
355350
356351 let mut gix_repo = gix_repo ( repo_path) ?;
@@ -404,13 +399,17 @@ pub fn get_diff(
404399
405400 let outcome = resource_cache. prepare_diff ( ) ?;
406401
407- let diff_algorithm = match outcome. operation {
408- Operation :: InternalDiff { algorithm } => algorithm,
409- Operation :: ExternalCommand { .. } => {
410- unreachable ! ( "We disabled that" )
411- }
412- Operation :: SourceOrDestinationIsBinary => {
413- todo ! ( ) ;
402+ let diff_algorithm = {
403+ use gix:: diff:: blob:: platform:: prepare_diff:: Operation ;
404+
405+ match outcome. operation {
406+ Operation :: InternalDiff { algorithm } => algorithm,
407+ Operation :: ExternalCommand { .. } => {
408+ unreachable ! ( "We disabled that" )
409+ }
410+ Operation :: SourceOrDestinationIsBinary => {
411+ todo ! ( ) ;
412+ }
414413 }
415414 } ;
416415
You can’t perform that action at this time.
0 commit comments