Address clippy::or_fun_call issues

This commit is contained in:
Samuele Maci 2019-08-17 14:10:36 +02:00
parent 0aa02f715f
commit 1ed7460bf3
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ impl PySequenceProtocol for ByteSequence {
self.elements
.get(idx as usize)
.map(|&byte| byte)
.ok_or(IndexError::py_err("list index out of range"))
.ok_or_else(|| IndexError::py_err("list index out of range"))
}
fn __setitem__(&mut self, idx: isize, value: u8) -> PyResult<()> {