Skip to content

Commit 79993d7

Browse files
committed
Removed workaround for lack of Either methods in 2.10/2.11
1 parent 97c29a5 commit 79993d7

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

core/shared/src/main/scala/scodec/bits/package.scala

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,4 @@ package object bits extends ScalaVersionSpecific {
3636
*/
3737
def hex(args: ByteVector*): ByteVector = macro LiteralSyntaxMacros.hexStringInterpolator
3838
}
39-
40-
private[bits] implicit class EitherOps[L, R](val self: Either[L, R]) extends AnyVal {
41-
def map[R2](f: R => R2): Either[L, R2] = self match {
42-
case Right(r) => Right(f(r))
43-
case l: Left[L, R] => l.asInstanceOf[Either[L, R2]]
44-
}
45-
46-
def flatMap[R2](f: R => Either[L, R2]): Either[L, R2] = self match {
47-
case Right(r) => f(r)
48-
case l: Left[L, R] => l.asInstanceOf[Either[L, R2]]
49-
}
50-
51-
def toOption: Option[R] = self match {
52-
case Right(r) => Some(r)
53-
case Left(_) => None
54-
}
55-
}
5639
}

0 commit comments

Comments
 (0)