We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6e423c commit 0706d8eCopy full SHA for 0706d8e
vm/src/stdlib/itertools.rs
@@ -1614,9 +1614,8 @@ mod decl {
1614
fn reduce(zelf: PyRef<Self>, vm: &VirtualMachine) -> PyResult<PyTupleRef> {
1615
let args: Vec<PyObjectRef> = zelf
1616
.iterators
1617
- .to_owned()
1618
- .into_iter()
1619
- .map(|i| i.to_pyobject(vm))
+ .iter()
+ .map(|i| i.clone().to_pyobject(vm))
1620
.collect();
1621
Ok(vm.new_tuple((
1622
zelf.class().to_owned(),
@@ -1627,7 +1626,7 @@ mod decl {
1627
1626
1628
#[pymethod(magic)]
1629
fn setstate(zelf: PyRef<Self>, state: PyObjectRef, _vm: &VirtualMachine) -> PyResult<()> {
1630
- *zelf.fillvalue.write() = state.to_owned();
+ *zelf.fillvalue.write() = state;
1631
Ok(())
1632
}
1633
0 commit comments