Skip to content

Commit de87494

Browse files
committed
Remove unused MatchTree from Decoder::RepeatFallback
1 parent 18566a7 commit de87494

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/lib.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ enum Decoder {
779779
Record(Vec<(Cow<'static, str>, Decoder)>),
780780
While(MatchTree, Box<Decoder>),
781781
Until(MatchTree, Box<Decoder>),
782-
RepeatFallback(MatchTree, Box<Decoder>, Box<Decoder>),
782+
RepeatFallback(Box<Decoder>, Box<Decoder>),
783783
RepeatCount(Expr, Box<Decoder>),
784784
RepeatUntilLast(Expr, Box<Decoder>),
785785
RepeatUntilSeq(Expr, Box<Decoder>),
@@ -2385,13 +2385,7 @@ impl Decoder {
23852385
Rc::new(Next::Repeat(wide, next.clone())),
23862386
)?);
23872387

2388-
if let Some(tree) =
2389-
MatchTree::build(compiler.module, std::slice::from_ref(format), next)
2390-
{
2391-
Ok(Decoder::RepeatFallback(tree, dnarrow, dwide))
2392-
} else {
2393-
Err(format!("canot build match treee for {:?}", format))
2394-
}
2388+
Ok(Decoder::RepeatFallback(dnarrow, dwide))
23952389
}
23962390
Format::Repeat1(a) => {
23972391
if a.is_nullable(compiler.module) {
@@ -2604,7 +2598,7 @@ impl Decoder {
26042598
}
26052599
Ok((Value::Seq(v), input))
26062600
}
2607-
Decoder::RepeatFallback(_tree, subset, superset) => {
2601+
Decoder::RepeatFallback(subset, superset) => {
26082602
let mut accum = Vec::new();
26092603
let mut incr_input = input;
26102604

0 commit comments

Comments
 (0)