rust/hg-cpython/src/dirstate/copymap.rs
changeset 44973 26114bd6ec60
parent 44234 bad4e7b361d2
child 47124 cd8ca38fccff
equal deleted inserted replaced
44962:ef8dcee272ac 44973:26114bd6ec60
    87     }
    87     }
    88     fn translate_key(
    88     fn translate_key(
    89         py: Python,
    89         py: Python,
    90         res: (&HgPathBuf, &HgPathBuf),
    90         res: (&HgPathBuf, &HgPathBuf),
    91     ) -> PyResult<Option<PyBytes>> {
    91     ) -> PyResult<Option<PyBytes>> {
    92         Ok(Some(PyBytes::new(py, res.0.as_ref())))
    92         Ok(Some(PyBytes::new(py, res.0.as_bytes())))
    93     }
    93     }
    94     fn translate_key_value(
    94     fn translate_key_value(
    95         py: Python,
    95         py: Python,
    96         res: (&HgPathBuf, &HgPathBuf),
    96         res: (&HgPathBuf, &HgPathBuf),
    97     ) -> PyResult<Option<(PyBytes, PyBytes)>> {
    97     ) -> PyResult<Option<(PyBytes, PyBytes)>> {
    98         let (k, v) = res;
    98         let (k, v) = res;
    99         Ok(Some((
    99         Ok(Some((
   100             PyBytes::new(py, k.as_ref()),
   100             PyBytes::new(py, k.as_bytes()),
   101             PyBytes::new(py, v.as_ref()),
   101             PyBytes::new(py, v.as_bytes()),
   102         )))
   102         )))
   103     }
   103     }
   104 }
   104 }
   105 
   105 
   106 py_shared_iterator!(
   106 py_shared_iterator!(