Skip to content

Commit

Permalink
fix compiler warnings - our match statements looked like something th…
Browse files Browse the repository at this point in the history
…ey didn't really do
  • Loading branch information
mpollmeier committed Apr 25, 2024
1 parent 739a6a9 commit 44f3a9b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class PathAwareTraversal[A](val wrapped: Iterator[(A, Vector[Any])]) extends Ite
new PathAwareTraversal(wrapped.flatMap { case (a, p) =>
traversals.iterator.flatMap { inner =>
inner(new PathAwareTraversal(Iterator.single((a, p)))) match {
case stillPathAware: PathAwareTraversal[B] => stillPathAware.wrapped
case stillPathAware: PathAwareTraversal[?] => stillPathAware.asInstanceOf[PathAwareTraversal[B]].wrapped
// do we really want to allow the following, or is it an error?
case notPathAware => notPathAware.iterator.map { (b: B) => (b, p.appended(a)) }
}
Expand All @@ -53,7 +53,7 @@ class PathAwareTraversal[A](val wrapped: Iterator[(A, Vector[Any])]) extends Ite
options
.applyOrElse(branchOnValue, (failState: BranchOn) => (unused: Iterator[A]) => Iterator.empty[NewEnd])
.apply(new PathAwareTraversal(Iterator.single((a, p)))) match {
case stillPathAware: PathAwareTraversal[NewEnd] => stillPathAware.wrapped
case stillPathAware: PathAwareTraversal[?] => stillPathAware.asInstanceOf[PathAwareTraversal[NewEnd]].wrapped
// do we really want to allow the following, or is it an error?
case notPathAware => notPathAware.iterator.map { (b: NewEnd) => (b, p.appended(a)) }
}
Expand All @@ -64,7 +64,7 @@ class PathAwareTraversal[A](val wrapped: Iterator[(A, Vector[Any])]) extends Ite
options.iterator
.map { inner =>
inner(new PathAwareTraversal(Iterator.single((a, p)))) match {
case stillPathAware: PathAwareTraversal[NewEnd] => stillPathAware.wrapped
case stillPathAware: PathAwareTraversal[?] => stillPathAware.asInstanceOf[PathAwareTraversal[NewEnd]].wrapped
// do we really want to allow the following, or is it an error?
case notPathAware => notPathAware.iterator.map { (b: NewEnd) => (b, p.appended(a)) }
}
Expand Down

0 comments on commit 44f3a9b

Please sign in to comment.