changeset 49925:49131579db62

rust-clippy: refactor complex type This makes reading the signature a bit less tiring.
author Raphaël Gomès <rgomes@octobus.net>
date Mon, 09 Jan 2023 18:50:29 +0100
parents 66ffe3749a48
children 0780371d6b1e
files rust/hg-core/src/operations/cat.rs
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/src/operations/cat.rs	Mon Jan 09 18:30:42 2023 +0100
+++ b/rust/hg-core/src/operations/cat.rs	Mon Jan 09 18:50:29 2023 +0100
@@ -53,10 +53,13 @@
     }
 }
 
+// Tuple of (missing, found) paths in the manifest
+type ManifestQueryResponse<'a> = (Vec<(&'a HgPath, Node)>, Vec<&'a HgPath>);
+
 fn find_files_in_manifest<'query>(
     manifest: &Manifest,
     query: impl Iterator<Item = &'query HgPath>,
-) -> Result<(Vec<(&'query HgPath, Node)>, Vec<&'query HgPath>), HgError> {
+) -> Result<ManifestQueryResponse<'query>, HgError> {
     let mut manifest = put_back(manifest.iter());
     let mut res = vec![];
     let mut missing = vec![];