Fix SwitchTarget pretty print
We currently rely on the order of successors to be conditional branches first, followed by the otherwise target.
This commit is contained in:
parent
3e0b2fac5d
commit
9d2c92377d
1 changed files with 1 additions and 4 deletions
|
@ -672,10 +672,7 @@ pub struct SwitchTargets {
|
|||
impl SwitchTargets {
|
||||
/// All possible targets including the `otherwise` target.
|
||||
pub fn all_targets(&self) -> Successors {
|
||||
Some(self.otherwise)
|
||||
.into_iter()
|
||||
.chain(self.branches.iter().map(|(_, target)| *target))
|
||||
.collect()
|
||||
self.branches.iter().map(|(_, target)| *target).chain(Some(self.otherwise)).collect()
|
||||
}
|
||||
|
||||
/// The `otherwise` branch target.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue