Use more slice patterns inside the compiler
This commit is contained in:
parent
60d146580c
commit
c4c518d2d4
40 changed files with 191 additions and 221 deletions
|
@ -350,8 +350,8 @@ fn bcb_filtered_successors<'a, 'tcx>(terminator: &'a Terminator<'tcx>) -> Covera
|
|||
// An inline asm terminator can normally be chained, except when it diverges or uses asm
|
||||
// goto.
|
||||
InlineAsm { ref targets, .. } => {
|
||||
if targets.len() == 1 {
|
||||
CoverageSuccessors::Chainable(targets[0])
|
||||
if let [target] = targets[..] {
|
||||
CoverageSuccessors::Chainable(target)
|
||||
} else {
|
||||
CoverageSuccessors::NotChainable(targets)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue