diff --git a/lib/desugar.c b/lib/desugar.c index 4596fcc..4508dc1 100644 --- a/lib/desugar.c +++ b/lib/desugar.c @@ -46,10 +46,8 @@ static bool deep_copy_sequence(parse_sequence_t *dst, parse_sequence_t *src) if (NULL == dst->contents) return false; - for (int i = 0; i < dst->count; ++i) { - if (!deep_copy_term(&dst->contents[i], &src->contents[i])) - return false; - } + for (int i = 0; i < dst->count; ++i) + assert(deep_copy_term(&dst->contents[i], &src->contents[i])); return true; } @@ -68,9 +66,8 @@ static bool deep_copy_term(parse_term_t *dst, parse_term_t *src) return false; for (int i = 0; i < dst->subexpr.count; ++i) { - if (!deep_copy_sequence( - &dst->subexpr.contents[i], &src->subexpr.contents[i])) - return false; + assert(deep_copy_sequence( + &dst->subexpr.contents[i], &src->subexpr.contents[i])); } }