diff options
author | Nick Fitzgerald <fitzgen@gmail.com> | 2017-07-24 12:44:33 -0700 |
---|---|---|
committer | Nick Fitzgerald <fitzgen@gmail.com> | 2017-07-24 12:44:33 -0700 |
commit | 684fc38271e1b91c8a7bfe77e122bfb2fa860498 (patch) | |
tree | a3b45d3b458769294368fa982840d89343b0c0bc | |
parent | 02cdafeaaee57563e60c2b0731ececbb1ac54671 (diff) |
Pull `return` up out of the branch arms
-rw-r--r-- | src/ir/analysis/derive_debug.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ir/analysis/derive_debug.rs b/src/ir/analysis/derive_debug.rs index 0f4b8365..ac2a92de 100644 --- a/src/ir/analysis/derive_debug.rs +++ b/src/ir/analysis/derive_debug.rs @@ -150,13 +150,13 @@ impl<'ctx, 'gen> MonotoneFramework for CannotDeriveDebug<'ctx, 'gen> { let layout_can_derive = ty.layout(self.ctx).map_or(true, |l| { l.opaque().can_trivially_derive_debug(self.ctx, ()) }); - if layout_can_derive { + return if layout_can_derive { trace!(" we can trivially derive Debug for the layout"); - return ConstrainResult::Same; + ConstrainResult::Same } else { trace!(" we cannot derive Debug for the layout"); - return self.insert(id); - } + self.insert(id) + }; } match *ty.kind() { |