Skip to content

Commit e536bd4

Browse files
committed
clippy: fix range_plus_one lint; eliminates a hidden panic path
1 parent e523b12 commit e536bd4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/script.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ impl<'a> Iterator for Instructions<'a> {
640640
self.data = &[];
641641
return Some(Err(Error::NonMinimalPush));
642642
}
643-
let ret = Some(Ok(Instruction::PushBytes(&self.data[1..n+1])));
643+
let ret = Some(Ok(Instruction::PushBytes(&self.data[1..=n])));
644644
self.data = &self.data[n + 1..];
645645
ret
646646
}

0 commit comments

Comments
 (0)