Use two slice expressions to save on an offset repetition
This commit is contained in:
parent
bac7d5b52c
commit
d55487d7e9
@ -40,7 +40,7 @@ pub fn ret_local(&self) -> &LocalDecl {
|
|||||||
|
|
||||||
/// Locals in `self` that correspond to this function's arguments.
|
/// Locals in `self` that correspond to this function's arguments.
|
||||||
pub fn arg_locals(&self) -> &[LocalDecl] {
|
pub fn arg_locals(&self) -> &[LocalDecl] {
|
||||||
&self.locals[1..self.arg_count + 1]
|
&self.locals[1..][..self.arg_count]
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Inner locals for this function. These are the locals that are
|
/// Inner locals for this function. These are the locals that are
|
||||||
|
Loading…
Reference in New Issue
Block a user