Skip to content

Commit

Permalink
Use two slice expressions to save on an offset repetition
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk authored Oct 26, 2023
1 parent bac7d5b commit d55487d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/stable_mir/src/mir/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl Body {

/// Locals in `self` that correspond to this function's arguments.
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
Expand Down

0 comments on commit d55487d

Please sign in to comment.