rust/hg-cpython/src/parsers.rs
changeset 44973 26114bd6ec60
parent 43826 5ac243a92e37
child 45357 27424779c5b8
--- a/rust/hg-cpython/src/parsers.rs	Mon Jun 15 15:14:16 2020 -0400
+++ b/rust/hg-cpython/src/parsers.rs	Mon Jun 15 18:26:40 2020 +0200
@@ -37,15 +37,15 @@
             for (filename, entry) in &dirstate_map {
                 dmap.set_item(
                     py,
-                    PyBytes::new(py, filename.as_ref()),
+                    PyBytes::new(py, filename.as_bytes()),
                     make_dirstate_tuple(py, entry)?,
                 )?;
             }
             for (path, copy_path) in copies {
                 copymap.set_item(
                     py,
-                    PyBytes::new(py, path.as_ref()),
-                    PyBytes::new(py, copy_path.as_ref()),
+                    PyBytes::new(py, path.as_bytes()),
+                    PyBytes::new(py, copy_path.as_bytes()),
                 )?;
             }
             Ok(
@@ -116,7 +116,7 @@
             for (filename, entry) in &dirstate_map {
                 dmap.set_item(
                     py,
-                    PyBytes::new(py, filename.as_ref()),
+                    PyBytes::new(py, filename.as_bytes()),
                     make_dirstate_tuple(py, entry)?,
                 )?;
             }