diff -r afe60def963d -r d9a66d62c604 rust/hg-core/src/dirstate_tree/dirstate_map.rs --- a/rust/hg-core/src/dirstate_tree/dirstate_map.rs Tue Mar 29 17:23:24 2022 +0200 +++ b/rust/hg-core/src/dirstate_tree/dirstate_map.rs Wed Mar 30 11:39:53 2022 +0200 @@ -1284,8 +1284,8 @@ pub fn copy_map_insert( &mut self, - key: HgPathBuf, - value: HgPathBuf, + key: &HgPath, + value: &HgPath, ) -> Result, DirstateV2ParseError> { self.with_dmap_mut(|map| { let node = DirstateMap::get_or_insert_node( @@ -1299,7 +1299,10 @@ if node.copy_source.is_none() { map.nodes_with_copy_source_count += 1 } - Ok(node.copy_source.replace(value.into()).map(Cow::into_owned)) + Ok(node + .copy_source + .replace(value.to_owned().into()) + .map(Cow::into_owned)) }) }