Skip to content

Commit

Permalink
Merge branch 'staging/5.0' into staging/5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
roccojiang authored Jan 30, 2024
2 parents 5b59a07 + f9bb8ab commit afe08cc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions parsley/shared/src/main/scala/parsley/errors/combinator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
*/
package parsley.errors

import scala.annotation.nowarn

import parsley.Parsley

import parsley.internal.deepembedding.{frontend, singletons}
Expand Down Expand Up @@ -496,7 +494,7 @@ object combinator {
* @return a parser which returns the result of this parser applied to pf, if possible.
* @see [[parsley.Parsley.collect `collect`]], which is a basic version of this same combinator with no customised error message.
* @see [[guardAgainst `guardAgainst`]], which is similar to `collectMsg`, except it does not transform the data.
* @see [[filterWithMsg `filterWithMsg`]], which is similar to `collectMsg`, except uses a `A => Either[Seq[String], B]` function.
* @see [[mapFilterMsg `mapFilterMsg`]], which is similar to `collectMsg`, except uses a `A => Either[Seq[String], B]` function.
* @note $autoAmend
* @note implemented in terms of [[collectWith `collectWith`]].
* @group filter
Expand Down Expand Up @@ -536,7 +534,7 @@ object combinator {
def mapFilterMsg[B](f: A => Either[Seq[String], B]): Parsley[B] = {
this.mapFilterWith(new SpecializedGen[A] {
override def messages(x: A) = {
val Left(errs) = f(x): @nowarn
val Left(errs) = f(x): @unchecked
errs
}
})(x => f(x).toOption)
Expand Down

0 comments on commit afe08cc

Please sign in to comment.