rust/hg-core/src/dirstate/dirstate_map.rs
changeset 47123 d8ac62374943
parent 47121 b6339a993b91
child 47124 cd8ca38fccff
--- a/rust/hg-core/src/dirstate/dirstate_map.rs	Fri Apr 30 18:13:31 2021 +0200
+++ b/rust/hg-core/src/dirstate/dirstate_map.rs	Fri Apr 30 18:24:54 2021 +0200
@@ -284,10 +284,10 @@
     }
 
     #[timed]
-    pub fn read<'a>(
+    pub fn read(
         &mut self,
-        file_contents: &'a [u8],
-    ) -> Result<Option<&'a DirstateParents>, DirstateError> {
+        file_contents: &[u8],
+    ) -> Result<Option<DirstateParents>, DirstateError> {
         if file_contents.is_empty() {
             return Ok(None);
         }
@@ -303,7 +303,7 @@
                 .into_iter()
                 .map(|(path, copy)| (path.to_owned(), copy.to_owned())),
         );
-        Ok(Some(parents))
+        Ok(Some(parents.clone()))
     }
 
     pub fn pack(