Mercurial > public > mercurial-scm > hg
diff rust/hg-cpython/src/dirstate/status.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 | 6193e846cb65 |
children | 532e74ad3ff6 |
line wrap: on
line diff
--- a/rust/hg-cpython/src/dirstate/status.rs Fri Jan 06 18:52:04 2023 +0100 +++ b/rust/hg-cpython/src/dirstate/status.rs Mon Jan 09 17:40:03 2023 +0100 @@ -72,12 +72,11 @@ for (path, bad_match) in collection.iter() { let message = match bad_match { BadMatch::OsError(code) => get_error_message(*code)?, - BadMatch::BadType(bad_type) => format!( - "unsupported file type (type is {})", - bad_type.to_string() - ) - .to_py_object(py) - .into_object(), + BadMatch::BadType(bad_type) => { + format!("unsupported file type (type is {})", bad_type) + .to_py_object(py) + .into_object() + } }; list.append( py,