-
Georges Racinet authored
This finally makes use of the latest `path` utilities. As a side note, `paths_py_list` cannot use `PyHgPathRef` itself because by calling `as_ref()` it would make the compiler believe it returns code owner by the inner `map` closure. Also, `status_path_py_list(py, &status_res.modified)?` can probably be replaced by ``` PyList::new(status_res.modified.iter().map(|p| PyHgPathRef(p)))? ``` with (granted) little benefit, but it could spare us a new utility each time there is a new collection type to return.
Georges Racinet authoredThis finally makes use of the latest `path` utilities. As a side note, `paths_py_list` cannot use `PyHgPathRef` itself because by calling `as_ref()` it would make the compiler believe it returns code owner by the inner `map` closure. Also, `status_path_py_list(py, &status_res.modified)?` can probably be replaced by ``` PyList::new(status_res.modified.iter().map(|p| PyHgPathRef(p)))? ``` with (granted) little benefit, but it could spare us a new utility each time there is a new collection type to return.
status.rs 8.99 KiB