Change DocFragments from enum variant fields to structs with a nested enum
This makes the code a lot easier to work with. It also makes it easier to add new fields without updating each variant and `match` individually. - Name the `Kind` variant after `DocFragmentKind` from `collapse_docs` - Remove unneeded impls
This commit is contained in:
@@ -232,7 +232,12 @@ impl fold::DocFolder for CoverageCalculator {
|
||||
let mut tests = Tests { found_tests: 0 };
|
||||
|
||||
find_testable_code(
|
||||
&i.attrs.doc_strings.iter().map(|d| d.as_str()).collect::<Vec<_>>().join("\n"),
|
||||
&i.attrs
|
||||
.doc_strings
|
||||
.iter()
|
||||
.map(|d| d.doc.as_str())
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n"),
|
||||
&mut tests,
|
||||
ErrorCodes::No,
|
||||
false,
|
||||
|
||||
Reference in New Issue
Block a user