@@ -168,7 +168,7 @@ sealed abstract class Either[+A, +B] extends Product with Serializable {
168
168
*
169
169
* Because `Either` is right-biased, this method is not normally needed.
170
170
*/
171
- @ deprecated(" Either is now right-biased" , " 2.13.0" )
171
+ @ deprecated(" Either is now right-biased, use methods directly on Either " , " 2.13.0" )
172
172
def right = Either .RightProjection (this )
173
173
174
174
/** Applies `fa` if this is a `Left` or `fb` if this is a `Right`.
@@ -512,7 +512,7 @@ object Either {
512
512
* @author <a href="mailto:[email protected] ">Tony Morris</a>, Workingmouse
513
513
* @see [[scala.util.Either#left ]]
514
514
*/
515
- @ deprecated(" use swap instead" , " 2.13.0" )
515
+ @ deprecated(" use ` swap` instead" , " 2.13.0" )
516
516
final case class LeftProjection [+ A , + B ](e : Either [A , B ]) {
517
517
/** Returns the value from this `Left` or throws `java.util.NoSuchElementException`
518
518
* if this is a `Right`.
@@ -524,6 +524,7 @@ object Either {
524
524
*
525
525
* @throws java.util.NoSuchElementException if the projection is [[scala.util.Right ]]
526
526
*/
527
+ @ deprecated(" use `Either.swap.getOrElse` instead" , " 2.13.0" )
527
528
def get : A = e match {
528
529
case Left (a) => a
529
530
case _ => throw new NoSuchElementException (" Either.left.get on Right" )
@@ -656,7 +657,7 @@ object Either {
656
657
*
657
658
* @author <a href="mailto:[email protected] ">Tony Morris</a>, Workingmouse
658
659
*/
659
- @ deprecated(" Either is now right-biased" , " 2.13.0" )
660
+ @ deprecated(" Either is now right-biased, calls to `right` should be removed " , " 2.13.0" )
660
661
final case class RightProjection [+ A , + B ](e : Either [A , B ]) {
661
662
662
663
/** Returns the value from this `Right` or throws
@@ -669,6 +670,7 @@ object Either {
669
670
*
670
671
* @throws java.util.NoSuchElementException if the projection is `Left`.
671
672
*/
673
+ @ deprecated(" Use `Either.getOrElse` instead" , " 2.13.0" )
672
674
def get : B = e match {
673
675
case Right (b) => b
674
676
case _ => throw new NoSuchElementException (" Either.right.get on Left" )
0 commit comments