Mercurial > public > mercurial-scm > hg
diff rust/hg-core/src/operations/cat.rs @ 49930:e98fd81bb151
rust-clippy: fix most warnings in `hg-core`
All of these are simple changes that for the most part are clear improvements
and the rest are at most equivalent.
The remaining warnings have to be fixed either with a bigger refactor like for
the nested "revlog" module, or in the dependency `bytes-cast`, which we own.
This will be done sometime in the future.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Mon, 09 Jan 2023 19:18:43 +0100 |
parents | 49131579db62 |
children | 750409505286 |
line wrap: on
line diff
--- a/rust/hg-core/src/operations/cat.rs Mon Jan 09 19:14:14 2023 +0100 +++ b/rust/hg-core/src/operations/cat.rs Mon Jan 09 19:18:43 2023 +0100 @@ -70,7 +70,7 @@ Some(item) => res.push((file, item)), } } - return Ok((res, missing)); + Ok((res, missing)) } /// Output the given revision of files @@ -94,10 +94,8 @@ files.sort_unstable(); - let (found, missing) = find_files_in_manifest( - &manifest, - files.into_iter().map(|f| f.as_ref()), - )?; + let (found, missing) = + find_files_in_manifest(&manifest, files.into_iter())?; for (file_path, file_node) in found { found_any = true;