changeset 49924:66ffe3749a48

rust-clippy: simplify return type of debug function This makes the type a little bit more readable.
author Raphaël Gomès <rgomes@octobus.net>
date Mon, 09 Jan 2023 18:30:42 +0100
parents 547d6817e0c3
children 49131579db62
files rust/hg-core/src/dirstate_tree/dirstate_map.rs
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate_tree/dirstate_map.rs	Mon Jan 09 18:27:53 2023 +0100
+++ b/rust/hg-core/src/dirstate_tree/dirstate_map.rs	Mon Jan 09 18:30:42 2023 +0100
@@ -939,6 +939,8 @@
     })
 }
 
+type DebugDirstateTuple<'a> = (&'a HgPath, (u8, i32, i32, i32));
+
 impl OwningDirstateMap {
     pub fn clear(&mut self) {
         self.with_dmap_mut(|map| {
@@ -1477,12 +1479,8 @@
         &self,
         all: bool,
     ) -> Box<
-        dyn Iterator<
-                Item = Result<
-                    (&HgPath, (u8, i32, i32, i32)),
-                    DirstateV2ParseError,
-                >,
-            > + Send
+        dyn Iterator<Item = Result<DebugDirstateTuple, DirstateV2ParseError>>
+            + Send
             + '_,
     > {
         let map = self.get_map();