Skip to content

Commit 13d5007

Browse files
authored
chore: use the built-in max/min to simplify the code (#12993)
1 parent fd712f7 commit 13d5007

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

chain/actors/policy/policy.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,10 +1026,3 @@ func GetSealProofFromPoStProof(postProof abi.RegisteredPoStProof) (abi.Registere
10261026
}
10271027
return sealProof, nil
10281028
}
1029-
1030-
func min(a, b int) int {
1031-
if a < b {
1032-
return a
1033-
}
1034-
return b
1035-
}

chain/actors/policy/policy.go.template

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -369,10 +369,3 @@ func GetSealProofFromPoStProof(postProof abi.RegisteredPoStProof) (abi.Registere
369369
}
370370
return sealProof, nil
371371
}
372-
373-
func min(a, b int) int {
374-
if a < b {
375-
return a
376-
}
377-
return b
378-
}

0 commit comments

Comments
 (0)