From 94dd54fbe4fe4629a422f6aa9680a64de8ee9e07 Mon Sep 17 00:00:00 2001 From: Jamie Willis Date: Mon, 29 Jan 2024 23:19:07 +0000 Subject: [PATCH 1/2] changed annotation to unchecked --- parsley/shared/src/main/scala/parsley/errors/combinator.scala | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/parsley/shared/src/main/scala/parsley/errors/combinator.scala b/parsley/shared/src/main/scala/parsley/errors/combinator.scala index f586c0e3f..947ce34d2 100644 --- a/parsley/shared/src/main/scala/parsley/errors/combinator.scala +++ b/parsley/shared/src/main/scala/parsley/errors/combinator.scala @@ -5,8 +5,6 @@ */ package parsley.errors -import scala.annotation.nowarn - import parsley.Parsley import parsley.internal.deepembedding.{frontend, singletons} @@ -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) From f9bb8ab973469894724a452b0810e048cae48af5 Mon Sep 17 00:00:00 2001 From: Jamie Willis Date: Mon, 29 Jan 2024 23:26:32 +0000 Subject: [PATCH 2/2] fix broken doc link --- parsley/shared/src/main/scala/parsley/errors/combinator.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsley/shared/src/main/scala/parsley/errors/combinator.scala b/parsley/shared/src/main/scala/parsley/errors/combinator.scala index 947ce34d2..4f6876560 100644 --- a/parsley/shared/src/main/scala/parsley/errors/combinator.scala +++ b/parsley/shared/src/main/scala/parsley/errors/combinator.scala @@ -494,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