Mercurial > hg
changeset 44232:06df075b8925
rust-cpython: use PyList.insert() instead of .insert_item()
Silences the deprecated warning.
https://github.com/dgrunwald/rust-cpython/commit/e8cbe864841714c5555db8c90e057bd11e360c7f
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Fri, 31 Jan 2020 00:08:30 +0900 |
parents | 25ed4d8e707f |
children | 281642cd1d04 |
files | rust/hg-cpython/src/dirstate/status.rs |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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(),