Auto merge of #104507 - WaffleLapkin:asderefsyou, r=wesleywiser
Use `as_deref` in compiler (but only where it makes sense) This simplifies some code :3 (there are some changes that are not exacly `as_deref`, but more like "clever `Option`/`Result` method use")
This commit is contained in:
commit
872631d0f0
27 changed files with 45 additions and 63 deletions
|
@ -174,7 +174,7 @@ impl CoverageMapGenerator {
|
|||
counter_regions.sort_unstable_by_key(|(_counter, region)| *region);
|
||||
for (counter, region) in counter_regions {
|
||||
let CodeRegion { file_name, start_line, start_col, end_line, end_col } = *region;
|
||||
let same_file = current_file_name.as_ref().map_or(false, |p| *p == file_name);
|
||||
let same_file = current_file_name.map_or(false, |p| p == file_name);
|
||||
if !same_file {
|
||||
if current_file_name.is_some() {
|
||||
current_file_id += 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue