simplify length count
This commit is contained in:
parent
d4c364347c
commit
e2dc3967fa
1 changed files with 1 additions and 1 deletions
|
@ -485,7 +485,7 @@ impl<'a, 'tcx> CoverageSpans<'a, 'tcx> {
|
||||||
}) {
|
}) {
|
||||||
let merged_prefix_len = self.curr_original_span.lo() - self.curr().span.lo();
|
let merged_prefix_len = self.curr_original_span.lo() - self.curr().span.lo();
|
||||||
let after_macro_bang =
|
let after_macro_bang =
|
||||||
merged_prefix_len + BytePos(visible_macro.as_str().bytes().count() as u32 + 1);
|
merged_prefix_len + BytePos(visible_macro.as_str().len() as u32 + 1);
|
||||||
let mut macro_name_cov = self.curr().clone();
|
let mut macro_name_cov = self.curr().clone();
|
||||||
self.curr_mut().span =
|
self.curr_mut().span =
|
||||||
self.curr().span.with_lo(self.curr().span.lo() + after_macro_bang);
|
self.curr().span.with_lo(self.curr().span.lo() + after_macro_bang);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue