Mon.invert renamed to swap
This commit is contained in:
parent
3789afb824
commit
c75204c676
2 changed files with 2 additions and 2 deletions
|
@ -85,7 +85,7 @@ class GitDBRepo {
|
|||
) {
|
||||
final GitTreeReader treeFilter = new GitTreeReader(repository).treeFilter(key);
|
||||
return streamTree(branchRef, treeFilter).flatMap(s ->
|
||||
Result.invert(s.findFirst()
|
||||
Result.swap(s.findFirst()
|
||||
.map(NamedRevBlob::blobAsString)
|
||||
.map(Maybe::just)
|
||||
.orElseGet(Maybe::nothing)));
|
||||
|
|
|
@ -114,7 +114,7 @@ final class LocalGitDBImpl implements GitDB, LocalGitDB {
|
|||
public Result<Maybe<GitDBBranch>> branch(final String name) {
|
||||
return Result.flatMapMaybe(
|
||||
Result.of(() -> Maybe.maybe(repository.findRef(name))),
|
||||
refMaybe -> Result.invert(refMaybe.map(branchInit)));
|
||||
refMaybe -> Result.swap(refMaybe.map(branchInit)));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue