We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
buildableOfCollCond
Current implementation of buildableOfCollCond isn't as performant as it could be, an alternative version such as
@SuppressWarnings( Array( "scalafix:DisableSyntax.while", "scalafix:DisableSyntax.return" ) ) @scala.annotation.nowarn("msg=return statement uses an exception") private def buildableOfCollCond[C <: Iterable[T], T](cond: C => Boolean, g: Gen[C])(implicit evb: Buildable[T, C] ): Gen[C] = Gen.infiniteLazyList(g).map { ll => val it = ll.iterator val bldr = evb.builder while (true) { val result = bldr.result() if (cond(result)) { return result } bldr ++= it.next() } return bldr.result() }
Note that this version of buildableOfCollCond doesn't actually it (it seems to have termination issues).
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Current implementation of
buildableOfCollCond
isn't as performant as it could be, an alternative version such asNote that this version of
buildableOfCollCond
doesn't actually it (it seems to have termination issues).The text was updated successfully, but these errors were encountered: