diff rust/rhg/src/utils/path_utils.rs @ 49914:58074252db3c

rust: run `cargo clippy` These automatic fixes are good to have because they make the code more idiomatic and less surprising. The transform from `sort` -> `sort_unstable` is questionable, but this is only in a test, so it doesn't matter in our case.
author Rapha?l Gom?s <rgomes@octobus.net>
date Mon, 09 Jan 2023 17:40:03 +0100
parents 9b0e1f64656f
children f33f37accb43
line wrap: on
line diff
--- a/rust/rhg/src/utils/path_utils.rs	Fri Jan 06 18:52:04 2023 +0100
+++ b/rust/rhg/src/utils/path_utils.rs	Mon Jan 09 17:40:03 2023 +0100
@@ -23,7 +23,7 @@
         let repo_root = repo.working_directory_path();
         let repo_root = cwd.join(repo_root); // Make it absolute
         let repo_root_hgpath =
-            HgPathBuf::from(get_bytes_from_path(repo_root.to_owned()));
+            HgPathBuf::from(get_bytes_from_path(&repo_root));
 
         if let Ok(cwd_relative_to_repo) = cwd.strip_prefix(&repo_root) {
             // The current directory is inside the repo, so we can work with