rust-clippy: refactor complex type
This makes reading the signature a bit less tiring.
--- 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![];