rust/hg-core/src/utils/files.rs
changeset 49930 e98fd81bb151
parent 48082 789475ef2b22
child 51120 532e74ad3ff6
--- a/rust/hg-core/src/utils/files.rs	Mon Jan 09 19:14:14 2023 +0100
+++ b/rust/hg-core/src/utils/files.rs	Mon Jan 09 19:18:43 2023 +0100
@@ -230,7 +230,7 @@
         // TODO hint to the user about using --cwd
         // Bubble up the responsibility to Python for now
         Err(HgPathError::NotUnderRoot {
-            path: original_name.to_owned(),
+            path: original_name,
             root: root.to_owned(),
         })
     }
@@ -424,7 +424,7 @@
         assert_eq!(
             canonical_path(&root, Path::new(""), &beneath_repo),
             Err(HgPathError::NotUnderRoot {
-                path: beneath_repo.to_owned(),
+                path: beneath_repo,
                 root: root.to_owned()
             })
         );