Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
43a9534
commit c75af9b
Showing
323 changed files
with
3,444 additions
and
13,066 deletions.
There are no files selected for viewing
75 changes: 0 additions & 75 deletions
75
benchmark/src/test/scala/com/zbsnetwork/serialization/protobuf/ProtoBufBenchmark.scala
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 1 addition & 9 deletions
10
common/shared/src/main/scala/com/zbsnetwork/common/utils/package.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,12 @@ | ||
package com.zbsnetwork.common | ||
import scala.util.{Failure, Success, Try} | ||
|
||
package object utils { | ||
|
||
implicit class EitherExt2[A, B](ei: Either[A, B]) { | ||
|
||
def explicitGet(): B = ei match { | ||
case Left(value) => throw new Exception(value.toString) | ||
case Right(value) => value | ||
} | ||
|
||
def foldToTry: Try[B] = { | ||
ei.fold( | ||
left => Failure(new Exception(left.toString)), | ||
right => Success(right) | ||
) | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.