From c4df22f1a9bb06bab8bc6dcbaa8f5de2ce50c071 Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Thu, 26 Oct 2023 22:14:01 +0100 Subject: [PATCH] Run code coverage with all features enabled. --- src/extract_doc.rs | 6 +++--- tools/codecov.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/extract_doc.rs b/src/extract_doc.rs index 5b75c47..d92ceac 100644 --- a/src/extract_doc.rs +++ b/src/extract_doc.rs @@ -55,13 +55,13 @@ pub fn extract_doc_from_source_str(source: &str) -> Result, ExtractD str.chars().all(char::is_whitespace) } - let x = string + let comment_lines = string .lines() .enumerate() .filter(|(i, l)| !(*i == 0 && empty_line(l))) - .map(|(_, l)| l); + .map(|(_, l)| l.to_owned()); - lines.extend(x.map(ToOwned::to_owned)); + lines.extend(comment_lines); } } } diff --git a/tools/codecov.sh b/tools/codecov.sh index 615cd55..f9586ab 100755 --- a/tools/codecov.sh +++ b/tools/codecov.sh @@ -36,7 +36,7 @@ done # TODO it seems the `--force-clean` is not working. cargo clean -cargo tarpaulin --force-clean --ignore-panics --engine llvm --timeout 1200 --out $output_format +cargo tarpaulin --force-clean --ignore-panics --engine llvm --timeout 1200 --out $output_format --all-features if [ "$output_format" == "html" ]; then echo