Skip to content

Commit 684fc38

Browse files
committed
Pull return up out of the branch arms
1 parent 02cdafe commit 684fc38

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ir/analysis/derive_debug.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,13 @@ impl<'ctx, 'gen> MonotoneFramework for CannotDeriveDebug<'ctx, 'gen> {
150150
let layout_can_derive = ty.layout(self.ctx).map_or(true, |l| {
151151
l.opaque().can_trivially_derive_debug(self.ctx, ())
152152
});
153-
if layout_can_derive {
153+
return if layout_can_derive {
154154
trace!(" we can trivially derive Debug for the layout");
155-
return ConstrainResult::Same;
155+
ConstrainResult::Same
156156
} else {
157157
trace!(" we cannot derive Debug for the layout");
158-
return self.insert(id);
159-
}
158+
self.insert(id)
159+
};
160160
}
161161

162162
match *ty.kind() {

0 commit comments

Comments
 (0)