refactor: use the built-in min to simplify the code (#15091)

Signed-off-by: riyueguang <rustruby@outlook.com>
This commit is contained in:
riyueguang
2025-04-02 01:57:22 +08:00
committed by GitHub
parent 17d0082c5c
commit 340935af9c
2 changed files with 4 additions and 4 deletions

View File

@@ -147,10 +147,7 @@ func (s *gcSizes) Alignof(T types.Type) int64 {
if a < 1 {
return 1
}
if a > s.MaxAlign {
return s.MaxAlign
}
return a
return min(a, s.MaxAlign)
}
var basicSizes = [...]byte{