rust/hg-cpython/src/revlog.rs
changeset 51202 16d477bb0078
parent 51201 52bbb57a76ad
child 51203 7434747343ab
--- a/rust/hg-cpython/src/revlog.rs	Fri Sep 29 15:51:49 2023 +0200
+++ b/rust/hg-cpython/src/revlog.rs	Sat Sep 30 16:15:56 2023 +0200
@@ -218,10 +218,11 @@
     def pack_header(&self, *args, **kw) -> PyResult<PyObject> {
         let rindex = self.index(py).borrow();
         let packed = rindex.pack_header(args.get_item(py, 0).extract(py)?);
-        let packed = PyBytes::new(py, &packed).into_object();
-        let cpacked = self.call_cindex(py, "pack_header", args, kw)?;
-        assert_py_eq(py, "pack_header", &packed, &cpacked)?;
-        Ok(packed)
+        let rust_res = PyBytes::new(py, &packed).into_object();
+
+        let c_res = self.call_cindex(py, "pack_header", args, kw)?;
+        assert_py_eq(py, "pack_header", &rust_res, &c_res)?;
+        Ok(rust_res)
     }
 
     /// get an index entry