mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 06:36:24 +00:00
Bump go version to 1.21
Allows us to use the much faster builtin min/max functions for two variable min/max
This commit is contained in:
parent
f125ffe3e0
commit
49ea26968c
17 changed files with 44 additions and 53 deletions
|
|
@ -269,12 +269,12 @@ func NewDiffer() *Differ {
|
|||
// Use to create a signature and possibly apply a delta
|
||||
func NewPatcher(expected_input_size int64) (ans *Patcher) {
|
||||
bs := DefaultBlockSize
|
||||
sz := utils.Max(0, expected_input_size)
|
||||
sz := max(0, expected_input_size)
|
||||
if sz > 0 {
|
||||
bs = int(math.Round(math.Sqrt(float64(sz))))
|
||||
}
|
||||
ans = &Patcher{}
|
||||
ans.rsync.BlockSize = utils.Min(bs, MaxBlockSize)
|
||||
ans.rsync.BlockSize = min(bs, MaxBlockSize)
|
||||
ans.rsync.SetHasher(new_xxh3_64)
|
||||
ans.rsync.SetChecksummer(new_xxh3_128)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue