Skip to content

deprecate OrderingOps and some IteratorOps#829

Open
halotukozak wants to merge 1 commit intomasterfrom
deprecate-some-shared-utils
Open

deprecate OrderingOps and some IteratorOps#829
halotukozak wants to merge 1 commit intomasterfrom
deprecate-some-shared-utils

Conversation

@halotukozak
Copy link
Copy Markdown
Member

These extensions won't be taken either way. The compiler always picks the member methods

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR deprecates a few SharedExtensions utilities that are redundant on Scala 2.13 because equivalent member methods exist in the standard library, making these extension methods effectively unused by normal method selection.

Changes:

  • Deprecated the SharedExtensions.orderingOps implicit conversion.
  • Deprecated IteratorOps.distinctBy and IteratorOps.distinct.
  • Deprecated OrderingOps.orElse and OrderingOps.orElseBy.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread core/src/main/scala/com/avsystem/commons/SharedExtensions.scala
@@ -825,13 +828,15 @@ object SharedExtensionsUtils extends SharedExtensions {
}

Comment on lines 751 to 771
@@ -765,6 +767,7 @@ object SharedExtensionsUtils extends SharedExtensions {
} else throw new NoSuchElementException
}

@deprecated("Scala 2.13 has native scala.collection.Iterator.distinct implementation", "2.27.0")
def distinct: Iterator[A] = distinctBy(identity)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants