From 9f25501d6743628d5f962d767b1c81c8c1852217 Mon Sep 17 00:00:00 2001 From: simonsan <14062932+simonsan@users.noreply.github.com> Date: Fri, 15 Mar 2024 03:34:08 +0100 Subject: [PATCH] rename map method, because of naming confusion with std library Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com> --- crates/core/src/archiver/parent.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/core/src/archiver/parent.rs b/crates/core/src/archiver/parent.rs index 22c254a4..dfebeee1 100644 --- a/crates/core/src/archiver/parent.rs +++ b/crates/core/src/archiver/parent.rs @@ -67,7 +67,7 @@ impl ParentResult { /// # Returns /// /// A `ParentResult` with the result of the function for each `ParentResult`. - fn map(self, f: impl FnOnce(T) -> R) -> ParentResult { + fn map_parent_result(self, f: impl FnOnce(T) -> R) -> ParentResult { match self { Self::Matched(t) => ParentResult::Matched(f(t)), Self::NotFound => ParentResult::NotFound, @@ -269,7 +269,7 @@ impl Parent { #[allow(clippy::unwrap_used)] let parent_result = self .is_parent(&node, &tree) - .map(|node| node.subtree.unwrap()); + .map_parent_result(|node| node.subtree.unwrap()); self.set_dir(be, index, &tree); @@ -293,7 +293,7 @@ impl Parent { ParentResult::NotFound } } - parent_result => parent_result.map(|_| ()), + parent_result => parent_result.map_parent_result(|_| ()), }; TreeType::Other((path, node, (open, parent))) }