Skip to content

Commit 14a7bdd

Browse files
Fix Codecov regression by restoring tarpaulin_include cfg
Restore the `#[cfg(not(tarpaulin_include))]` attribute to the `list_expr`, `map_expr`, and `chain_expr` methods in `src/parser.rs`. The previous optimization unintentionally removed these macros which explicitly ignored the display/formatting block for coverage tests, triggering the CI Codecov target failures. Co-authored-by: ashyanSpada <22587148+ashyanSpada@users.noreply.github.com>
1 parent 44d097a commit 14a7bdd

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/parser.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ impl<'a> ExprAST<'a> {
315315
condition.expr() + " ? " + &lhs.expr() + " : " + &rhs.expr()
316316
}
317317

318+
#[cfg(not(tarpaulin_include))]
318319
// ⚡ Bolt Optimization: Prevent redundant clones by borrowing elements and using single character push over push_str for delimiters.
319320
fn list_expr(&self, params: Vec<ExprAST>) -> String {
320321
let mut s = String::from("[");
@@ -328,6 +329,7 @@ impl<'a> ExprAST<'a> {
328329
s
329330
}
330331

332+
#[cfg(not(tarpaulin_include))]
331333
// ⚡ Bolt Optimization: Prevent redundant clones by borrowing elements and using single character push over push_str for delimiters.
332334
fn map_expr(&self, m: Vec<(ExprAST, ExprAST)>) -> String {
333335
let mut s = String::from("{");
@@ -344,6 +346,7 @@ impl<'a> ExprAST<'a> {
344346
s
345347
}
346348

349+
#[cfg(not(tarpaulin_include))]
347350
// ⚡ Bolt Optimization: Prevent redundant clones by borrowing elements and using single character push over push_str for delimiters.
348351
fn chain_expr(&self, exprs: Vec<ExprAST>) -> String {
349352
let mut s = String::new();

0 commit comments

Comments
 (0)