Skip to content

Commit 22c3511

Browse files
committed
fmt
1 parent 98d3416 commit 22c3511

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

raft/src/main/scala/zio/raft/Raft.scala

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -913,12 +913,13 @@ class Raft[S, A <: Command](
913913
for
914914
lastIndex <- logStore.lastIndex
915915
isPendingRead <- raftState.modify {
916-
case l: Leader[S] if lastIndex > l.lastApplied => (Right(true), l.withPendingRead(PendingReadEntry[S](r.promise, lastIndex)))
916+
case l: Leader[S] if lastIndex > l.lastApplied =>
917+
(Right(true), l.withPendingRead(PendingReadEntry[S](r.promise, lastIndex)))
917918

918-
// TODO (eran): when leader validation is implemented, we should use it here instead
919-
case l: Leader[S] => (Right(false), l)
920-
case f: Follower[S] => (Left(NotALeaderError(f.leaderId)), f)
921-
case c: Candidate[S] => (Left(NotALeaderError(None)), c)
919+
// TODO (eran): when leader validation is implemented, we should use it here instead
920+
case l: Leader[S] => (Right(false), l)
921+
case f: Follower[S] => (Left(NotALeaderError(f.leaderId)), f)
922+
case c: Candidate[S] => (Left(NotALeaderError(None)), c)
922923
}
923924
_ <- isPendingRead match
924925
case Right(true) => ZIO.unit

0 commit comments

Comments
 (0)