Skip to content

Commit d55487d

Browse files
authored
Use two slice expressions to save on an offset repetition
1 parent bac7d5b commit d55487d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/stable_mir/src/mir/body.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl Body {
4040

4141
/// Locals in `self` that correspond to this function's arguments.
4242
pub fn arg_locals(&self) -> &[LocalDecl] {
43-
&self.locals[1..self.arg_count + 1]
43+
&self.locals[1..][..self.arg_count]
4444
}
4545

4646
/// Inner locals for this function. These are the locals that are

0 commit comments

Comments
 (0)