@@ -3,7 +3,7 @@ mod to_additive_hunks {
33
44 #[ test]
55 fn rejected ( ) {
6- let with = vec ! [ hunk_header( "-1,10" , "+1,10" ) ] ;
6+ let wth = vec ! [ hunk_header( "-1,10" , "+1,10" ) ] ;
77 insta:: assert_debug_snapshot!( to_additive_hunks(
88 [
99 // rejected as old is out of bounds
@@ -13,8 +13,8 @@ mod to_additive_hunks {
1313 // rejected as it doesn't match any anchor point, nor does it match hunks without context
1414 hunk_header( "-0,0" , "+2,10" )
1515 ] ,
16- & with ,
17- & with ,
16+ & wth ,
17+ & wth ,
1818 ) . unwrap( ) , @r#"
1919 (
2020 [],
@@ -29,15 +29,15 @@ mod to_additive_hunks {
2929
3030 #[ test]
3131 fn only_selections ( ) {
32- let with = vec ! [ hunk_header( "-1,10" , "+1,10" ) ] ;
32+ let wth = vec ! [ hunk_header( "-1,10" , "+1,10" ) ] ;
3333 insta:: assert_debug_snapshot!( to_additive_hunks(
3434 [
3535 hunk_header( "-1,1" , "+0,0" ) ,
3636 hunk_header( "-5,2" , "+0,0" ) ,
3737 hunk_header( "-10,1" , "+0,0" )
3838 ] ,
39- & with ,
40- & with ,
39+ & wth ,
40+ & wth ,
4141 ) . unwrap( ) , @r#"
4242 (
4343 [
@@ -54,8 +54,8 @@ mod to_additive_hunks {
5454 hunk_header( "-0,0" , "+5,2" ) ,
5555 hunk_header( "-0,0" , "+10,1" )
5656 ] ,
57- & with ,
58- & with ,
57+ & wth ,
58+ & wth ,
5959 ) . unwrap( ) , @r#"
6060 (
6161 [
@@ -72,8 +72,8 @@ mod to_additive_hunks {
7272 hunk_header( "-5,2" , "+0,0" ) ,
7373 hunk_header( "-0,0" , "+10,1" )
7474 ] ,
75- & with ,
76- & with ,
75+ & wth ,
76+ & wth ,
7777 ) . unwrap( ) , @r#"
7878 (
7979 [
@@ -90,8 +90,8 @@ mod to_additive_hunks {
9090 hunk_header( "-0,0" , "+5,2" ) ,
9191 hunk_header( "-10,1" , "+0,0" )
9292 ] ,
93- & with ,
94- & with ,
93+ & wth ,
94+ & wth ,
9595 ) . unwrap( ) , @r#"
9696 (
9797 [
@@ -106,7 +106,7 @@ mod to_additive_hunks {
106106
107107 #[ test]
108108 fn selections_and_full_hunks ( ) {
109- let with = vec ! [
109+ let wth = vec ! [
110110 hunk_header( "-1,10" , "+1,10" ) ,
111111 hunk_header( "-15,5" , "+20,5" ) ,
112112 hunk_header( "-25,5" , "+40,5" ) ,
@@ -120,8 +120,8 @@ mod to_additive_hunks {
120120 hunk_header( "-0,0" , "+22,3" ) ,
121121 // Last hunk isn't used
122122 ] ,
123- & with ,
124- & with ,
123+ & wth ,
124+ & wth ,
125125 ) . unwrap( ) , @r#"
126126 (
127127 [
@@ -136,7 +136,7 @@ mod to_additive_hunks {
136136
137137 #[ test]
138138 fn only_full_hunks ( ) {
139- let with = vec ! [
139+ let wth = vec ! [
140140 hunk_header( "-1,10" , "+1,10" ) ,
141141 hunk_header( "-15,5" , "+20,5" ) ,
142142 hunk_header( "-25,5" , "+40,5" ) ,
@@ -148,8 +148,8 @@ mod to_additive_hunks {
148148 hunk_header( "-15,5" , "+20,5" ) ,
149149 // Last hunk isn't used
150150 ] ,
151- & with ,
152- & with ,
151+ & wth ,
152+ & wth ,
153153 ) . unwrap( ) , @r#"
154154 (
155155 [
@@ -180,7 +180,7 @@ mod to_additive_hunks {
180180 // 99
181181 // -100
182182 // +119
183- let with = vec ! [ hunk_header( "-93,8" , "+93,10" ) ] ;
183+ let wth = vec ! [ hunk_header( "-93,8" , "+93,10" ) ] ;
184184
185185 // diff --git a/file b/file
186186 // index 190423f..b513cb5 100644
@@ -203,7 +203,7 @@ mod to_additive_hunks {
203203
204204 insta:: assert_debug_snapshot!( to_additive_hunks(
205205 [ hunk_header( "-96,1" , "+0,0" ) ] ,
206- & with ,
206+ & wth ,
207207 & wth0,
208208 ) . unwrap( ) , @r#"
209209 (
@@ -215,7 +215,7 @@ mod to_additive_hunks {
215215 "# ) ;
216216 insta:: assert_debug_snapshot!( to_additive_hunks(
217217 [ hunk_header( "-96,1" , "+0,0" ) , hunk_header( "-0,0" , "+96,2" ) ] ,
218- & with ,
218+ & wth ,
219219 & wth0,
220220 ) . unwrap( ) , @r#"
221221 (
@@ -228,7 +228,7 @@ mod to_additive_hunks {
228228 "# ) ;
229229 insta:: assert_debug_snapshot!( to_additive_hunks(
230230 [ hunk_header( "-0,0" , "+96,2" ) ] ,
231- & with ,
231+ & wth ,
232232 & wth0,
233233 ) . unwrap( ) , @r#"
234234 (
@@ -242,7 +242,7 @@ mod to_additive_hunks {
242242
243243 #[ test]
244244 fn real_world_issue ( ) {
245- let with = vec ! [ hunk_header( "-1,214" , "+1,55" ) ] ;
245+ let wth = vec ! [ hunk_header( "-1,214" , "+1,55" ) ] ;
246246 let wth0 = vec ! [
247247 hunk_header( "-4,13" , "+4,0" ) ,
248248 hunk_header( "-18,19" , "+5,1" ) ,
@@ -262,7 +262,7 @@ mod to_additive_hunks {
262262 hunk_header ( "-207,1" , "+0,0" ) ,
263263 hunk_header ( "-209,3" , "+0,0" ) ,
264264 ] ,
265- & with ,
265+ & wth ,
266266 & wth0,
267267 )
268268 . unwrap ( ) ;
@@ -287,7 +287,7 @@ mod to_additive_hunks {
287287 hunk_header ( "-209,1" , "+0,0" ) ,
288288 hunk_header ( "-211,1" , "+0,0" ) ,
289289 ] ,
290- & with ,
290+ & wth ,
291291 & wth0,
292292 )
293293 . unwrap ( ) ;
@@ -316,7 +316,7 @@ mod to_additive_hunks {
316316 hunk_header ( "-0,0" , "+30,2" ) ,
317317 hunk_header ( "-0,0" , "+50,3" ) ,
318318 ] ,
319- & with ,
319+ & wth ,
320320 & wth0,
321321 )
322322 . unwrap ( ) ;
@@ -337,7 +337,7 @@ mod to_additive_hunks {
337337
338338 #[ test]
339339 fn only_selections_workspace_example ( ) {
340- let with = vec ! [ hunk_header( "-1,10" , "+1,10" ) ] ;
340+ let wth = vec ! [ hunk_header( "-1,10" , "+1,10" ) ] ;
341341 let actual = to_additive_hunks (
342342 [
343343 // commit NOT '2,3' of the old
@@ -355,8 +355,8 @@ mod to_additive_hunks {
355355 // commit '19,20' of the new
356356 hunk_header ( "-0,0" , "+9,2" ) ,
357357 ] ,
358- & with ,
359- & with ,
358+ & wth ,
359+ & wth ,
360360 )
361361 . unwrap ( ) ;
362362 insta:: assert_debug_snapshot!( actual, @r#"
0 commit comments