# HG changeset patch # User Raphaël Gomès # Date 2023-01-09 17:50:29 # Node ID 49131579db62babbf0a1cc6eb485cc360d8fcc82 # Parent 66ffe3749a484ef222fb361593d7ee59f483e822 rust-clippy: refactor complex type This makes reading the signature a bit less tiring. diff --git a/rust/hg-core/src/operations/cat.rs b/rust/hg-core/src/operations/cat.rs --- a/rust/hg-core/src/operations/cat.rs +++ b/rust/hg-core/src/operations/cat.rs @@ -53,10 +53,13 @@ fn find_item<'a>( } } +// 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, -) -> Result<(Vec<(&'query HgPath, Node)>, Vec<&'query HgPath>), HgError> { +) -> Result, HgError> { let mut manifest = put_back(manifest.iter()); let mut res = vec![]; let mut missing = vec![];