File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,10 @@ impl Coverage {
8989/// Compute per-function covered spans with function names preserved.
9090/// Returns a map from qualified function names (e.g., "vector::append") to their covered spans.
9191/// Only functions with some covered code are included in the result.
92+ ///
93+ /// Some of the logic is borrowed from the implementation of `SourceCoverageBuilder` in
94+ /// aptos-core/third_party/move/tools/move-coverage/src/source_coverage.rs
95+ /// The difference is that we map the covered code to function in belongs to
9296fn compute_function_covered_spans (
9397 coverage_map : & CoverageMap ,
9498 root_modules : Vec < ( & move_binary_format:: CompiledModule , & SourceMap ) > ,
@@ -158,7 +162,7 @@ fn compute_function_covered_spans(
158162}
159163
160164/// Given a list of locations, merge overlapping and abutting locations.
161- /// Taken from aptos-core third-party/move/tools/move-coverage/src/source_coverage.rs
165+ /// Borrowed from aptos-core/ third-party/move/tools/move-coverage/src/source_coverage.rs
162166fn minimize_locations ( mut locs : Vec < IrLoc > ) -> Vec < IrLoc > {
163167 locs. sort ( ) ;
164168 let mut result = vec ! [ ] ;
You can’t perform that action at this time.
0 commit comments