We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e0b2fa commit 9d2c923Copy full SHA for 9d2c923
compiler/stable_mir/src/mir/body.rs
@@ -672,10 +672,7 @@ pub struct SwitchTargets {
672
impl SwitchTargets {
673
/// All possible targets including the `otherwise` target.
674
pub fn all_targets(&self) -> Successors {
675
- Some(self.otherwise)
676
- .into_iter()
677
- .chain(self.branches.iter().map(|(_, target)| *target))
678
- .collect()
+ self.branches.iter().map(|(_, target)| *target).chain(Some(self.otherwise)).collect()
679
}
680
681
/// The `otherwise` branch target.
0 commit comments