Skip to content

Commit 026484c

Browse files
authoredJan 25, 2024
Merge pull request #135 from pav-kv/rm-min-max
remove unused min and max funcs
2 parents e22adc0 + c6025da commit 026484c

File tree

2 files changed

+0
-28
lines changed

2 files changed

+0
-28
lines changed
 

‎tracker/progress.go

-14
Original file line numberDiff line numberDiff line change
@@ -106,20 +106,6 @@ func (pr *Progress) ResetState(state StateType) {
106106
pr.Inflights.reset()
107107
}
108108

109-
func max(a, b uint64) uint64 {
110-
if a > b {
111-
return a
112-
}
113-
return b
114-
}
115-
116-
func min(a, b uint64) uint64 {
117-
if a > b {
118-
return b
119-
}
120-
return a
121-
}
122-
123109
// BecomeProbe transitions into StateProbe. Next is reset to Match+1 or,
124110
// optionally and if larger, the index of the pending snapshot.
125111
func (pr *Progress) BecomeProbe() {

‎util.go

-14
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,6 @@ func (st StateType) MarshalJSON() ([]byte, error) {
2626
return []byte(fmt.Sprintf("%q", st.String())), nil
2727
}
2828

29-
func min(a, b uint64) uint64 {
30-
if a > b {
31-
return b
32-
}
33-
return a
34-
}
35-
36-
func max(a, b uint64) uint64 {
37-
if a > b {
38-
return a
39-
}
40-
return b
41-
}
42-
4329
var isLocalMsg = [...]bool{
4430
pb.MsgHup: true,
4531
pb.MsgBeat: true,

0 commit comments

Comments
 (0)
Please sign in to comment.