Skip to content

Commit

Permalink
fix: Remove redundant result
Browse files Browse the repository at this point in the history
We were showing the child predicate twice, one underneath the other,
because we both forwarded its `Display` *and* added `self` to the case
tree.
  • Loading branch information
epage committed Nov 22, 2021
1 parent 4010ef4 commit afb25c6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/path/fc.rs
Expand Up @@ -75,10 +75,7 @@ where
) -> Option<reflection::Case<'a>> {
let buffer = read_file(variable);
match (expected, buffer) {
(_, Ok(buffer)) => self
.p
.find_case(expected, &buffer)
.map(|child| reflection::Case::new(Some(self), expected).add_child(child)),
(_, Ok(buffer)) => self.p.find_case(expected, &buffer),
(true, Err(_)) => None,
(false, Err(err)) => Some(
reflection::Case::new(Some(self), false)
Expand Down

0 comments on commit afb25c6

Please sign in to comment.