Skip to content
New issue

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

Add toNev to NonEmptyList variants #3423

Merged

Conversation

saraiva132
Copy link
Contributor

Closes #3422

*}}}
*/
final def toNev[B >: A]: NonEmptyVector[B] =
NonEmptyVector.fromVectorUnsafe(toLazyList.toList.toVector)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does LazyList not have its own toVector method?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. It does. Additionally, I was missing an import. I will push changes. Thank you @LukaJCB :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course :)

@codecov-commenter
Copy link

codecov-commenter commented May 20, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@4465141). Click here to learn what that means.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #3423   +/-   ##
=========================================
  Coverage          ?   92.71%           
=========================================
  Files             ?      379           
  Lines             ?     7988           
  Branches          ?      229           
=========================================
  Hits              ?     7406           
  Misses            ?      582           
  Partials          ?        0           
Flag Coverage Δ
#scala_version_212 92.74% <100.00%> (?)
#scala_version_213 92.50% <100.00%> (?)
Impacted Files Coverage Δ
.../main/scala-2.13+/cats/data/NonEmptyLazyList.scala 79.46% <100.00%> (ø)
core/src/main/scala/cats/data/NonEmptyList.scala 98.74% <100.00%> (ø)
core/src/main/scala/cats/Applicative.scala 95.00% <0.00%> (ø)
...main/scala/cats/laws/discipline/BimonadTests.scala 100.00% <0.00%> (ø)
...ain/scala/cats/kernel/instances/IntInstances.scala 100.00% <0.00%> (ø)
.../main/scala/cats/laws/discipline/ChoiceTests.scala 100.00% <0.00%> (ø)
...c/main/scala/cats/free/ContravariantCoyoneda.scala 100.00% <0.00%> (ø)
laws/src/main/scala/cats/laws/ArrowLaws.scala 100.00% <0.00%> (ø)
core/src/main/scala/cats/syntax/vector.scala 100.00% <0.00%> (ø)
laws/src/main/scala/cats/laws/BifunctorLaws.scala 100.00% <0.00%> (ø)
... and 371 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4465141...cf92734. Read the comment docs.

@djspiewak djspiewak merged commit de8cc76 into typelevel:master May 21, 2020
* res0: Boolean = true
*}}}
*/
def toNev[B >: A]: NonEmptyVector[B] =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason this one isn't final but the one above is?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. NonEmptyList is a final class. LazyNonEmptyList is not.

@travisbrown travisbrown added this to the 2.2.0-M2 milestone May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add toNev combinator in NonEmptyList
5 participants