From 86cef6738d632eb8cfd6a464b86f643e1f098dc9 Mon Sep 17 00:00:00 2001 From: jfh Date: Mon, 12 Jul 2021 00:22:03 +0300 Subject: [PATCH] Address review comments. --- vm/src/builtins/list.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vm/src/builtins/list.rs b/vm/src/builtins/list.rs index d4cfa323a..71df39b76 100644 --- a/vm/src/builtins/list.rs +++ b/vm/src/builtins/list.rs @@ -490,10 +490,10 @@ impl PyListIterator { } #[pymethod(name = "__setstate__")] - fn setstate(&self, state: PyObjectRef, vm: &VirtualMachine) -> PyResult { + fn setstate(&self, state: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> { // When we're exhausted, just return. if let Exhausted = self.status.load() { - return Ok(vm.ctx.none()); + return Ok(()); } if let Some(i) = state.payload::() { let position = std::cmp::min( @@ -501,7 +501,7 @@ impl PyListIterator { self.list.len(), ); self.position.store(position); - Ok(vm.ctx.none()) + Ok(()) } else { Err(vm.new_type_error("an integer is required.".to_owned())) }