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(
346
346
stage : bool ,
347
347
options : Option < DiffOptions > ,
348
348
) -> 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
-
354
349
scope_time ! ( "get_diff" ) ;
355
350
356
351
let mut gix_repo = gix_repo ( repo_path) ?;
@@ -404,13 +399,17 @@ pub fn get_diff(
404
399
405
400
let outcome = resource_cache. prepare_diff ( ) ?;
406
401
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
+ }
414
413
}
415
414
} ;
416
415
You can’t perform that action at this time.
0 commit comments