Skip to content

Commit

Permalink
Merge pull request etcd-io#135 from pav-kv/rm-min-max
Browse files Browse the repository at this point in the history
remove unused min and max funcs
  • Loading branch information
ahrtr authored Jan 25, 2024
2 parents e22adc0 + c6025da commit 026484c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
14 changes: 0 additions & 14 deletions tracker/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,6 @@ func (pr *Progress) ResetState(state StateType) {
pr.Inflights.reset()
}

func max(a, b uint64) uint64 {
if a > b {
return a
}
return b
}

func min(a, b uint64) uint64 {
if a > b {
return b
}
return a
}

// BecomeProbe transitions into StateProbe. Next is reset to Match+1 or,
// optionally and if larger, the index of the pending snapshot.
func (pr *Progress) BecomeProbe() {
Expand Down
14 changes: 0 additions & 14 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,6 @@ func (st StateType) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf("%q", st.String())), nil
}

func min(a, b uint64) uint64 {
if a > b {
return b
}
return a
}

func max(a, b uint64) uint64 {
if a > b {
return a
}
return b
}

var isLocalMsg = [...]bool{
pb.MsgHup: true,
pb.MsgBeat: true,
Expand Down

0 comments on commit 026484c

Please sign in to comment.