Mercurial > public > mercurial-scm > hg
diff rust/rhg/src/commands/debugignorerhg.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 | 37bc3edef76f |
children | 04b9a56c2d25 |
line wrap: on
line diff
--- a/rust/rhg/src/commands/debugignorerhg.rs Fri Jan 06 18:52:04 2023 +0100 +++ b/rust/rhg/src/commands/debugignorerhg.rs Mon Jan 09 17:40:03 2023 +0100 @@ -23,10 +23,10 @@ let (ignore_matcher, warnings) = get_ignore_matcher( vec![ignore_file], - &repo.working_directory_path().to_owned(), + repo.working_directory_path(), &mut |_source, _pattern_bytes| (), ) - .map_err(|e| StatusError::from(e))?; + .map_err(StatusError::from)?; if !warnings.is_empty() { warn!("Pattern warnings: {:?}", &warnings);