about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-09-11 13:32:53 -0400
committerMichael Goulet <michael@errs.io>2024-09-11 13:45:23 -0400
commit954419aab01264707f116899e77be682b02764ea (patch)
tree9c66d40f49925803e11e7aebe913bf39297a9751 /compiler/rustc_monomorphize/src
parent5a2dd7d4f3210629e65879aeecbe643ba3b86bb4 (diff)
downloadrust-954419aab01264707f116899e77be682b02764ea.tar.gz
rust-954419aab01264707f116899e77be682b02764ea.zip
Simplify some nested if statements
Diffstat (limited to 'compiler/rustc_monomorphize/src')
-rw-r--r--compiler/rustc_monomorphize/src/partitioning.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_monomorphize/src/partitioning.rs b/compiler/rustc_monomorphize/src/partitioning.rs
index 0d295b8f280..2d9dbdbaec2 100644
--- a/compiler/rustc_monomorphize/src/partitioning.rs
+++ b/compiler/rustc_monomorphize/src/partitioning.rs
@@ -504,10 +504,8 @@ fn compute_inlined_overlap<'tcx>(cgu1: &CodegenUnit<'tcx>, cgu2: &CodegenUnit<'t
 
     let mut overlap = 0;
     for (item, data) in src_cgu.items().iter() {
-        if data.inlined {
-            if dst_cgu.items().contains_key(item) {
-                overlap += data.size_estimate;
-            }
+        if data.inlined && dst_cgu.items().contains_key(item) {
+            overlap += data.size_estimate;
         }
     }
     overlap