Skip to content

Commit 86cef67

Browse files
committed
Address review comments.
1 parent 95ba82b commit 86cef67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vm/src/builtins/list.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,18 +490,18 @@ impl PyListIterator {
490490
}
491491

492492
#[pymethod(name = "__setstate__")]
493-
fn setstate(&self, state: PyObjectRef, vm: &VirtualMachine) -> PyResult {
493+
fn setstate(&self, state: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> {
494494
// When we're exhausted, just return.
495495
if let Exhausted = self.status.load() {
496-
return Ok(vm.ctx.none());
496+
return Ok(());
497497
}
498498
if let Some(i) = state.payload::<PyInt>() {
499499
let position = std::cmp::min(
500500
int::try_to_primitive(i.as_bigint(), vm).unwrap_or(0),
501501
self.list.len(),
502502
);
503503
self.position.store(position);
504-
Ok(vm.ctx.none())
504+
Ok(())
505505
} else {
506506
Err(vm.new_type_error("an integer is required.".to_owned()))
507507
}

0 commit comments

Comments
 (0)