@@ -656,9 +656,7 @@ pub async fn revert_remaining_redirect_edits(
656656 }
657657 }
658658 }
659- outcome
660- . reverted_files
661- . extend ( staged. keys ( ) . cloned ( ) ) ;
659+ outcome. reverted_files . extend ( staged. keys ( ) . cloned ( ) ) ;
662660 pending_warnings. extend ( group_warnings) ;
663661 drop_indices. extend ( group_drops) ;
664662 }
@@ -725,9 +723,9 @@ mod tests {
725723 let mut state = RedirectState :: new ( ) ;
726724 state. edits = edits;
727725 for p in record_purls {
728- state
729- . records
730- . insert ( ( * p ) . to_string ( ) , crate :: manifest:: schema:: PatchRecord {
726+ state. records . insert (
727+ ( * p ) . to_string ( ) ,
728+ crate :: manifest:: schema:: PatchRecord {
731729 uuid : "u" . into ( ) ,
732730 exported_at : "now" . into ( ) ,
733731 files : Default :: default ( ) ,
@@ -776,7 +774,10 @@ mod tests {
776774 ) ;
777775 let out = revert_remaining_redirect_edits ( dir. path ( ) , & mut state, false ) . await ;
778776 assert ! ( out. fully_reverted( ) , "{:?}" , out. refusals) ;
779- assert_eq ! ( read( dir. path( ) , "requirements.txt" ) . await , "left-pad==1.3.0\n " ) ;
777+ assert_eq ! (
778+ read( dir. path( ) , "requirements.txt" ) . await ,
779+ "left-pad==1.3.0\n "
780+ ) ;
780781 assert ! ( state. edits. is_empty( ) ) ;
781782 assert ! ( state. records. is_empty( ) ) ;
782783 assert_eq ! ( out
. dropped_records
, vec!
[ "pkg:pypi/[email protected] " ] ) ; @@ -804,7 +805,10 @@ mod tests {
804805 ) ;
805806 let out = revert_remaining_redirect_edits ( dir. path ( ) , & mut state, false ) . await ;
806807 assert ! ( out. fully_reverted( ) , "{:?}" , out. refusals) ;
807- assert_eq ! ( read( dir. path( ) , "pom.xml" ) . await , "<version>2.17.1</version>\n " ) ;
808+ assert_eq ! (
809+ read( dir. path( ) , "pom.xml" ) . await ,
810+ "<version>2.17.1</version>\n "
811+ ) ;
808812 }
809813
810814 #[ tokio:: test]
@@ -1248,7 +1252,9 @@ mod tests {
12481252 // The npm group refused; the bun group replayed.
12491253 assert_eq ! ( out. refusals. len( ) , 1 ) ;
12501254 assert_eq ! ( out. refusals[ 0 ] . group, "npm" ) ;
1251- assert ! ( read( dir. path( ) , "bun.lock" ) . await . contains( "upstream.example" ) ) ;
1255+ assert ! ( read( dir. path( ) , "bun.lock" )
1256+ . await
1257+ . contains( "upstream.example" ) ) ;
12521258 // npm-family records are held while ANY npm-family group refused.
12531259 assert ! ( state. records. contains_key( "pkg:npm/a@1" ) ) ;
12541260 assert_eq ! ( state. edits. len( ) , 1 , "only the refused npm edit remains" ) ;
@@ -1428,7 +1434,9 @@ mod tests {
14281434 assert_eq ! ( out
. dropped_records
, vec!
[ "pkg:pypi/[email protected] " ] ) ; 14291435 assert ! ( out. reverted_files. contains( "requirements.txt" ) ) ;
14301436 // Disk and ledger untouched.
1431- assert ! ( read( dir. path( ) , "requirements.txt" ) . await . contains( "patch.example" ) ) ;
1437+ assert ! ( read( dir. path( ) , "requirements.txt" )
1438+ . await
1439+ . contains( "patch.example" ) ) ;
14321440 assert_eq ! ( state. edits. len( ) , 1 ) ;
14331441 assert_eq ! ( state. records. len( ) , 1 ) ;
14341442 }
@@ -1645,7 +1653,9 @@ mod tests {
16451653 ) ;
16461654 let out = revert_remaining_redirect_edits ( dir. path ( ) , & mut state, false ) . await ;
16471655 assert_eq ! ( out. refusals. len( ) , 1 , "{out:?}" ) ;
1648- assert ! ( out. refusals[ 0 ] . reason. contains( "missing its recorded lines" ) ) ;
1656+ assert ! ( out. refusals[ 0 ]
1657+ . reason
1658+ . contains( "missing its recorded lines" ) ) ;
16491659 assert_eq ! ( state. edits. len( ) , 1 ) ;
16501660 assert_eq ! ( read( dir. path( ) , "go.sum" ) . await , "x v1 h1:a\n " ) ;
16511661 }
@@ -1690,10 +1700,16 @@ mod tests {
16901700 ] ;
16911701 for ( path, kind, action, original, new) in cases {
16921702 let dir = TempDir :: new ( ) . unwrap ( ) ;
1693- tokio:: fs:: create_dir_all ( dir. path ( ) . join ( path) ) . await . unwrap ( ) ;
1703+ tokio:: fs:: create_dir_all ( dir. path ( ) . join ( path) )
1704+ . await
1705+ . unwrap ( ) ;
16941706 let mut state = state_with ( vec ! [ edit( path, kind, action, original, new) ] , & [ ] ) ;
16951707 let out = revert_remaining_redirect_edits ( dir. path ( ) , & mut state, false ) . await ;
1696- assert_eq ! ( out. refusals. len( ) , 1 , "{kind}/{action} must refuse: {out:?}" ) ;
1708+ assert_eq ! (
1709+ out. refusals. len( ) ,
1710+ 1 ,
1711+ "{kind}/{action} must refuse: {out:?}"
1712+ ) ;
16971713 assert ! (
16981714 out. refusals[ 0 ] . reason. starts_with( & format!( "read {path}:" ) ) ,
16991715 "{kind}/{action}: {}" ,
@@ -1958,7 +1974,10 @@ mod tests {
19581974 ) ;
19591975 let out = revert_remaining_redirect_edits ( dir. path ( ) , & mut state, false ) . await ;
19601976 assert_eq ! ( out. refusals. len( ) , 1 , "{out:?}" ) ;
1961- assert_eq ! ( out. refusals[ 0 ] . reason, "composer.lock is not a regular file" ) ;
1977+ assert_eq ! (
1978+ out. refusals[ 0 ] . reason,
1979+ "composer.lock is not a regular file"
1980+ ) ;
19621981 assert_eq ! (
19631982 read( dir. path( ) , "real.lock" ) . await ,
19641983 "https://patch.example/a\n " ,
0 commit comments