Use two slice expressions to save on an offset repetition

This commit is contained in:
Oli Scherer 2023-10-26 12:32:47 +02:00 committed by GitHub
parent bac7d5b52c
commit d55487d7e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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