Use Vec::split_off
This commit is contained in:
parent
c9c1346874
commit
a71b808d77
1 changed files with 1 additions and 1 deletions
|
@ -111,7 +111,7 @@ fn split_block(
|
|||
|
||||
// Drain every statement after this one and move the current terminator to a new basic block
|
||||
let new_block = BasicBlockData {
|
||||
statements: block_data.statements.drain(location.statement_index..).collect(),
|
||||
statements: block_data.statements.split_off(location.statement_index),
|
||||
terminator: block_data.terminator.take(),
|
||||
is_cleanup: block_data.is_cleanup,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue