rust-cpython: use PyList.insert() instead of .insert_item()
authorYuya Nishihara <yuya@tcha.org>
Fri, 31 Jan 2020 00:08:30 +0900
changeset 44232 06df075b8925
parent 44231 25ed4d8e707f
child 44233 281642cd1d04
rust-cpython: use PyList.insert() instead of .insert_item() Silences the deprecated warning. https://github.com/dgrunwald/rust-cpython/commit/e8cbe864841714c5555db8c90e057bd11e360c7f
rust/hg-cpython/src/dirstate/status.rs
--- a/rust/hg-cpython/src/dirstate/status.rs	Fri Jan 31 00:01:29 2020 +0900
+++ b/rust/hg-cpython/src/dirstate/status.rs	Fri Jan 31 00:08:30 2020 +0900
@@ -33,7 +33,7 @@
     let list = PyList::new(py, &[]);
 
     for (i, path) in collection.iter().enumerate() {
-        list.insert_item(
+        list.insert(
             py,
             i,
             PyBytes::new(py, path.as_ref().as_bytes()).into_object(),