@@ -282,9 +282,9 @@ fn expand_subtree<S: Span>(
282
282
}
283
283
284
284
let res = if ctx. new_meta_vars {
285
- count ( ctx , binding, 0 , depth. unwrap_or ( 0 ) )
285
+ count ( binding, 0 , depth. unwrap_or ( 0 ) )
286
286
} else {
287
- count_old ( ctx , binding, 0 , * depth)
287
+ count_old ( binding, 0 , * depth)
288
288
} ;
289
289
290
290
let c = match res {
@@ -537,7 +537,6 @@ fn fix_up_and_push_path_tt<S: Span>(
537
537
/// Handles `${count(t, depth)}`. `our_depth` is the recursion depth and `count_depth` is the depth
538
538
/// defined by the metavar expression.
539
539
fn count < S > (
540
- ctx : & ExpandCtx < ' _ , S > ,
541
540
binding : & Binding < S > ,
542
541
depth_curr : usize ,
543
542
depth_max : usize ,
@@ -547,7 +546,7 @@ fn count<S>(
547
546
if depth_curr == depth_max {
548
547
Ok ( bs. len ( ) )
549
548
} else {
550
- bs. iter ( ) . map ( |b| count ( ctx , b, depth_curr + 1 , depth_max) ) . sum ( )
549
+ bs. iter ( ) . map ( |b| count ( b, depth_curr + 1 , depth_max) ) . sum ( )
551
550
}
552
551
}
553
552
Binding :: Empty => Ok ( 0 ) ,
@@ -556,16 +555,15 @@ fn count<S>(
556
555
}
557
556
558
557
fn count_old < S > (
559
- ctx : & ExpandCtx < ' _ , S > ,
560
558
binding : & Binding < S > ,
561
559
our_depth : usize ,
562
560
count_depth : Option < usize > ,
563
561
) -> Result < usize , CountError > {
564
562
match binding {
565
563
Binding :: Nested ( bs) => match count_depth {
566
- None => bs. iter ( ) . map ( |b| count_old ( ctx , b, our_depth + 1 , None ) ) . sum ( ) ,
564
+ None => bs. iter ( ) . map ( |b| count_old ( b, our_depth + 1 , None ) ) . sum ( ) ,
567
565
Some ( 0 ) => Ok ( bs. len ( ) ) ,
568
- Some ( d) => bs. iter ( ) . map ( |b| count_old ( ctx , b, our_depth + 1 , Some ( d - 1 ) ) ) . sum ( ) ,
566
+ Some ( d) => bs. iter ( ) . map ( |b| count_old ( b, our_depth + 1 , Some ( d - 1 ) ) ) . sum ( ) ,
569
567
} ,
570
568
Binding :: Empty => Ok ( 0 ) ,
571
569
Binding :: Fragment ( _) | Binding :: Missing ( _) => {
0 commit comments