diff -r ef8dcee272ac -r 26114bd6ec60 rust/hg-cpython/src/dirstate/copymap.rs --- a/rust/hg-cpython/src/dirstate/copymap.rs Mon Jun 15 15:14:16 2020 -0400 +++ b/rust/hg-cpython/src/dirstate/copymap.rs Mon Jun 15 18:26:40 2020 +0200 @@ -89,7 +89,7 @@ py: Python, res: (&HgPathBuf, &HgPathBuf), ) -> PyResult> { - Ok(Some(PyBytes::new(py, res.0.as_ref()))) + Ok(Some(PyBytes::new(py, res.0.as_bytes()))) } fn translate_key_value( py: Python, @@ -97,8 +97,8 @@ ) -> PyResult> { let (k, v) = res; Ok(Some(( - PyBytes::new(py, k.as_ref()), - PyBytes::new(py, v.as_ref()), + PyBytes::new(py, k.as_bytes()), + PyBytes::new(py, v.as_bytes()), ))) } }