Skip to content

Commit

Permalink
rename map method, because of naming confusion with std library
Browse files Browse the repository at this point in the history
Signed-off-by: simonsan <[email protected]>
  • Loading branch information
simonsan committed Mar 15, 2024
1 parent 0a742c5 commit 9f25501
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/core/src/archiver/parent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl<T> ParentResult<T> {
/// # Returns
///
/// A `ParentResult<R>` with the result of the function for each `ParentResult<T>`.
fn map<R>(self, f: impl FnOnce(T) -> R) -> ParentResult<R> {
fn map_parent_result<R>(self, f: impl FnOnce(T) -> R) -> ParentResult<R> {

Check warning on line 70 in crates/core/src/archiver/parent.rs

View check run for this annotation

Codecov / codecov/patch

crates/core/src/archiver/parent.rs#L70

Added line #L70 was not covered by tests
match self {
Self::Matched(t) => ParentResult::Matched(f(t)),
Self::NotFound => ParentResult::NotFound,
Expand Down Expand Up @@ -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);

Expand All @@ -293,7 +293,7 @@ impl Parent {
ParentResult::NotFound
}
}
parent_result => parent_result.map(|_| ()),
parent_result => parent_result.map_parent_result(|_| ()),

Check warning on line 296 in crates/core/src/archiver/parent.rs

View check run for this annotation

Codecov / codecov/patch

crates/core/src/archiver/parent.rs#L296

Added line #L296 was not covered by tests
};
TreeType::Other((path, node, (open, parent)))
}
Expand Down

0 comments on commit 9f25501

Please sign in to comment.