Skip to content
Snippets Groups Projects
  • Georges Racinet's avatar
    38e16da74aea
    rust-pyo3-dirstate: status · 38e16da74aea
    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.
    38e16da74aea
    History
    rust-pyo3-dirstate: status
    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.