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

Deprecate IterableOps.toIterable #9774

Merged
merged 3 commits into from Sep 30, 2021
Merged

Conversation

lrytz
Copy link
Member

@lrytz lrytz commented Sep 29, 2021

The method is a noop on any Iterable, it only does something for an object that is an IterableOps but not an Iterable. This should never be the case in user code.

The method is cofusing because its name is like toList or toSeq, but toIterable returns non-immutable collections unchanged. toIterable is therefore also different from to(Iterable).

@SethTisue SethTisue added the library:collections PRs involving changes to the standard collection library label Sep 29, 2021
@NthPortal
Copy link
Contributor

is this release notes worthy?

@SethTisue
Copy link
Member

SethTisue commented Sep 29, 2021

probably. I was thinking that if people aren't using it they don't care and if they are using it they'll see the deprecation warning.

but on second thought, I think it's better to call attention it

@SethTisue SethTisue added the release-notes worth highlighting in next release notes label Sep 29, 2021
@SethTisue SethTisue requested a review from a team September 29, 2021 13:53
@NthPortal NthPortal merged commit e41a0cc into scala:2.13.x Sep 30, 2021
@SethTisue SethTisue changed the title Deprecate IterableOps.toIterable Deprecate IterableOps.toIterable Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
library:collections PRs involving changes to the standard collection library release-notes worth highlighting in next release notes
Projects
None yet
4 participants